williballenthin / python-evtx

Pure Python parser for Windows Event Log files (.evtx)
Apache License 2.0
732 stars 166 forks source link

Short event log files are not processed #4

Closed bpasteur closed 11 years ago

bpasteur commented 11 years ago

An event log file short enough to have only one chunk will fail in the class FileHeader function chunks(). Changing the line: while ofs + 0x10000 < len(self._buf): to: while ofs + 0x10000 <= len(self._buf):

will fix the issue

williballenthin commented 11 years ago

awesome! thanks for taking the time to report the bug, and also including a fix!