From 167c5b5cf6ca2cede85628e5b0d7d001342d68cd Mon Sep 17 00:00:00 2001 From: jacksonfylle Date: Fri, 23 Aug 2019 23:18:12 +0200 Subject: [PATCH] Catch ElementTree.ParseError in winevtx parser when parsing XML (#2740) --- plaso/parsers/winevtx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plaso/parsers/winevtx.py b/plaso/parsers/winevtx.py index 1189c8890f..69369d56c6 100644 --- a/plaso/parsers/winevtx.py +++ b/plaso/parsers/winevtx.py @@ -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))