From 8cedd3e46930b72b88320e86e258a7e3757e29e0 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 4 Jun 2022 22:02:13 -0700 Subject: [PATCH] Handle malformed IS-CAB filenames --- BurnOutSharp/FileType/InstallShieldCAB.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/BurnOutSharp/FileType/InstallShieldCAB.cs b/BurnOutSharp/FileType/InstallShieldCAB.cs index 06a0853e..264a968e 100644 --- a/BurnOutSharp/FileType/InstallShieldCAB.cs +++ b/BurnOutSharp/FileType/InstallShieldCAB.cs @@ -61,7 +61,17 @@ namespace BurnOutSharp.FileType // If an individual entry fails try { - string tempFile = Path.Combine(tempPath, cabfile.FileName(i)); + string filename = cabfile.FileName(i); + string tempFile; + try + { + tempFile = Path.Combine(tempPath, filename); + } + catch + { + tempFile = Path.Combine(tempPath, $"BAD_FILENAME{i}"); + } + cabfile.FileSave(i, tempFile); } catch (Exception ex)