Windows: protect again mz_offsets being None

This commit is contained in:
Mike Auty
2024-11-29 08:51:06 +00:00
parent 3748cb89b8
commit 393db1050f
+1 -1
View File
@@ -272,7 +272,7 @@ class KernelPDBScanner(interfaces.automagic.AutomagicInterface):
for kernel in kernels:
vollog.log(
constants.LOGLEVEL_VVVV,
f"Testing potential kernel for {kernel.get('pdb_name', 'Unknown')} at {kernel.get('signature_offset', -1):x} with MZ offset at {kernel.get('mz_offset', -1):x}",
f"Testing potential kernel for {kernel.get('pdb_name', 'Unknown')} at {kernel.get('signature_offset', -1):x} with MZ offset at {(kernel.get('mz_offset', -1) or -1):x}",
)
valid_kernel = test_kernel(physical_layer_name, virtual_layer_name, kernel)
if valid_kernel is not None: