From fa48187304039f8792d8e19129df7d64422e7f69 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sat, 30 Sep 2023 14:45:53 +0200 Subject: [PATCH] fuzz: Disable XML_PARSE_SAX1 option in xml fuzzer There a no plans to fix quadratic behavior in the legacy SAX1 interface. --- fuzz/xml.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fuzz/xml.c b/fuzz/xml.c index c03b282f..ab4ad21c 100644 --- a/fuzz/xml.c +++ b/fuzz/xml.c @@ -34,7 +34,12 @@ LLVMFuzzerTestOneInput(const char *data, size_t size) { xmlFuzzDataInit(data, size); opts = (int) xmlFuzzReadInt(4); - opts &= ~XML_PARSE_XINCLUDE & ~XML_PARSE_DTDVALID; + /* + * Disable options that are known to cause timeouts + */ + opts &= ~XML_PARSE_XINCLUDE & + ~XML_PARSE_DTDVALID & + ~XML_PARSE_SAX1; maxAlloc = xmlFuzzReadInt(4) % (size + 1); xmlFuzzReadEntities();