Commit 6fcf5ada94c82c6515b3a676c95d4f512ddf475b
1 parent
dcecff4e
rtfobj: fixed call to RtfParser._end_of_file (issue #185)
Showing
2 changed files
with
6 additions
and
4 deletions
oletools/rtfobj.py
| ... | ... | @@ -74,8 +74,9 @@ http://www.decalage.info/python/oletools |
| 74 | 74 | # 2017-06-08 PL: - fixed issue/PR #143: bin object with negative length |
| 75 | 75 | # 2017-06-29 PL: - temporary fix for issue #178 |
| 76 | 76 | # 2017-07-14 v0.51.1 PL: - disabled logging of each control word (issue #184) |
| 77 | +# 2017-07-24 PL: - fixed call to RtfParser._end_of_file (issue #185) | |
| 77 | 78 | |
| 78 | -__version__ = '0.51.1dev2' | |
| 79 | +__version__ = '0.51.1dev3' | |
| 79 | 80 | |
| 80 | 81 | # ------------------------------------------------------------------------------ |
| 81 | 82 | # TODO: |
| ... | ... | @@ -411,7 +412,8 @@ class RtfParser(object): |
| 411 | 412 | self.index += len(m.group()) |
| 412 | 413 | continue |
| 413 | 414 | raise RuntimeError('Should not have reached this point - index=%Xh' % self.index) |
| 414 | - self.end_of_file() | |
| 415 | + # call _end_of_file to make sure all groups are closed properly | |
| 416 | + self._end_of_file() | |
| 415 | 417 | |
| 416 | 418 | |
| 417 | 419 | def _open_group(self): |
| ... | ... | @@ -527,7 +529,7 @@ class RtfParser(object): |
| 527 | 529 | # log.debug('%Xh Reached End of File') |
| 528 | 530 | # close any group/destination that is still open: |
| 529 | 531 | while self.group_level > 0: |
| 530 | - # log.debug('Group Level = %d, closing group' % self.group_level) | |
| 532 | + log.debug('Group Level = %d, closing group' % self.group_level) | |
| 531 | 533 | self._close_group() |
| 532 | 534 | self.end_of_file() |
| 533 | 535 | ... | ... |
setup.py
| ... | ... | @@ -41,7 +41,7 @@ import os, fnmatch |
| 41 | 41 | #--- METADATA ----------------------------------------------------------------- |
| 42 | 42 | |
| 43 | 43 | name = "oletools" |
| 44 | -version = '0.51.1dev2' | |
| 44 | +version = '0.51.1dev3' | |
| 45 | 45 | desc = "Python tools to analyze security characteristics of MS Office and OLE files (also called Structured Storage, Compound File Binary Format or Compound Document File Format), for Malware Analysis and Incident Response #DFIR" |
| 46 | 46 | long_desc = open('oletools/README.rst').read() |
| 47 | 47 | author = "Philippe Lagadec" | ... | ... |