Catch invalid _OBJECT_HEADER objects.

This commit is contained in:
Mike Auty
2018-12-13 01:16:05 +00:00
committed by ikelos
parent 650a188d51
commit 76264cee34
2 changed files with 9 additions and 5 deletions
@@ -470,10 +470,13 @@ class _OBJECT_HEADER(objects.Struct):
def is_valid(self) -> bool:
"""Determine if the object is valid"""
#if self.InfoMask > 0x48:
# if self.InfoMask > 0x48:
# return False
if self.PointerCount > 0x1000000 or self.PointerCount < 0:
try:
if self.PointerCount > 0x1000000 or self.PointerCount < 0:
return False
except exceptions.InvalidAddressException:
return False
return True