From 914497b76fe9d7ec714cf6479d1339c25ddce471 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 14 Mar 2022 11:26:10 -0700 Subject: [PATCH] Slightly safer checks before invoking --- BurnOutSharp/FileType/Executable.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BurnOutSharp/FileType/Executable.cs b/BurnOutSharp/FileType/Executable.cs index a20d96ad..f6c6de6c 100644 --- a/BurnOutSharp/FileType/Executable.cs +++ b/BurnOutSharp/FileType/Executable.cs @@ -138,7 +138,7 @@ namespace BurnOutSharp.FileType }); // If we have a NE executable, iterate through all NE content checks - if (nex != null) + if (nex?.DOSStubHeader != null) { Parallel.ForEach(neContentCheckClasses, contentCheckClass => { @@ -165,7 +165,7 @@ namespace BurnOutSharp.FileType } // If we have a PE executable, iterate through all PE content checks - if (pex != null) + if (pex?.SectionTable != null) { Parallel.ForEach(peContentCheckClasses, contentCheckClass => {