Skip to content

Commit

Permalink
Catch ElementTree.ParseError in winevtx parser when parsing XML (#2740)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonfylle authored and joachimmetz committed Aug 23, 2019
1 parent 9948c92 commit 167c5b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plaso/parsers/winevtx.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def _ParseRecords(self, parser_mediator, evtx_file):
evtx_record = evtx_file.get_record(record_index)
self._ParseRecord(parser_mediator, record_index, evtx_record)

except IOError as exception:
except (IOError, ElementTree.ParseError) as exception:
parser_mediator.ProduceExtractionWarning(
'unable to parse event record: {0:d} with error: {1!s}'.format(
record_index, exception))
Expand Down

0 comments on commit 167c5b5

Please sign in to comment.