lxml: catch highest exception (#7550)

fuzz_html_parse can also throw SerialisationError:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46579

Forces the fuzzers to catch highest lxml exception for now.
This commit is contained in:
DavidKorczynski 2022-04-11 11:09:22 +01:00 committed by GitHub
parent 05be069314
commit 845b915110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ def TestOneInput(data):
root = et.HTML(data)
if root != None:
et.tostring(root)
except et.XMLSyntaxError:
except et.LxmlError:
None

View File

@ -30,7 +30,7 @@ def TestOneInput(data):
handler = sax.ElementTreeContentHandler()
sax.ElementTreeProducer(parsed, handler).saxify()
except et.XMLSyntaxError:
except et.LxmlError:
None
def main():