diff --git a/oletools/thirdparty/olefile/olefile.py b/oletools/thirdparty/olefile/olefile.py index 6b5c149..cd40472 100755 --- a/oletools/thirdparty/olefile/olefile.py +++ b/oletools/thirdparty/olefile/olefile.py @@ -1030,11 +1030,10 @@ class OleDirectoryEntry: #[PL] this method was added to use simple recursion instead of a complex # algorithm. # if this is not a storage or a leaf of the tree, nothing to do: - if child_sid == NOSTREAM: return # check if child SID is in the proper range: - if child_sid <= 0 or child_sid >= len(self.olefile.direntries): + if child_sid<0 or child_sid>=len(self.olefile.direntries): self.olefile._raise_defect(DEFECT_INCORRECT, 'OLE DirEntry index out of range') else: # get child direntry: