From a818a8af0a3b30b493a061f52df1813c4ee770f8 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 30 Jul 2025 11:36:10 -0400 Subject: [PATCH] Fix deserialization issue for CFB --- BinaryObjectScanner/Data/StaticChecks.cs | 2 +- BinaryObjectScanner/FileType/CFB.cs | 3 +++ README.md | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BinaryObjectScanner/Data/StaticChecks.cs b/BinaryObjectScanner/Data/StaticChecks.cs index c477af9c..e75c02d1 100644 --- a/BinaryObjectScanner/Data/StaticChecks.cs +++ b/BinaryObjectScanner/Data/StaticChecks.cs @@ -139,7 +139,7 @@ namespace BinaryObjectScanner.Data } catch (ReflectionTypeLoadException rtle) { - assemblyTypes = [.. rtle.Types]; + assemblyTypes = [.. rtle!.Types]; } // Get information from the type param diff --git a/BinaryObjectScanner/FileType/CFB.cs b/BinaryObjectScanner/FileType/CFB.cs index da796a9e..0a902c35 100644 --- a/BinaryObjectScanner/FileType/CFB.cs +++ b/BinaryObjectScanner/FileType/CFB.cs @@ -29,6 +29,9 @@ namespace BinaryObjectScanner.FileType { // Get a wrapper for the CFB var model = Deserialize(stream); + if (model == null) + return false; + var cfb = new SabreTools.Serialization.Wrappers.CFB(model, stream); if (cfb?.Model == null) return false; diff --git a/README.md b/README.md index 4bf11b32..83eb6cbc 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Below is a list of protections detected by BinaryObjectScanner. The two columns | AegiSoft License Manager | True | True | | | Alpha-DVD | False | True | Unconfirmed¹ | | Alpha-ROM | True | False | | -| Armadillo | True | False | | +| Armadillo | True | False | | | Bitpool | False | True | | | ByteShield | True | True | | | C-Dilla License Management Solution / CD-Secure / CD-Compress | True | True | |