From e3eed76826fe8a4254783eb59e91abe69233e935 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 20 Jun 2024 11:26:20 -0400 Subject: [PATCH] Make debug table reading safer, kinda --- BinaryObjectScanner/Protection/Macrovision.SafeDisc.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BinaryObjectScanner/Protection/Macrovision.SafeDisc.cs b/BinaryObjectScanner/Protection/Macrovision.SafeDisc.cs index 7612c848..fb8cc28b 100644 --- a/BinaryObjectScanner/Protection/Macrovision.SafeDisc.cs +++ b/BinaryObjectScanner/Protection/Macrovision.SafeDisc.cs @@ -108,8 +108,12 @@ namespace BinaryObjectScanner.Protection // Found in Redump entries 20729 and 65569. // Get the debug data - if (pex.FindCodeViewDebugTableByPath("SafeDisc").Any() || pex.FindCodeViewDebugTableByPath("Safedisk").Any()) - return "SafeDisc"; + try + { + if (pex.FindCodeViewDebugTableByPath("SafeDisc").Any() || pex.FindCodeViewDebugTableByPath("Safedisk").Any()) + return "SafeDisc"; + } + catch { } // TODO: Investigate various section names: // "STLPORT_" - Found in Redump entry 11638.