diff --git a/olefile/olefile.py b/olefile/olefile.py index 7cf59f4..ddbc320 100644 --- a/olefile/olefile.py +++ b/olefile/olefile.py @@ -2172,6 +2172,9 @@ def getproperties(self, filename, convert_time=False, no_conversion=None): num_props = min(num_props, int(len(s) / 8)) for i in iterrange(num_props): property_id = 0 # just in case of an exception + if 8+i*8 > len(s): + break + try: property_id = i32(s, 8+i*8) offset = i32(s, 12+i*8)