mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
fuzz: Disable XML_PARSE_SAX1 option in xml fuzzer
There a no plans to fix quadratic behavior in the legacy SAX1 interface.
This commit is contained in:
@@ -34,7 +34,12 @@ LLVMFuzzerTestOneInput(const char *data, size_t size) {
|
|||||||
|
|
||||||
xmlFuzzDataInit(data, size);
|
xmlFuzzDataInit(data, size);
|
||||||
opts = (int) xmlFuzzReadInt(4);
|
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);
|
maxAlloc = xmlFuzzReadInt(4) % (size + 1);
|
||||||
|
|
||||||
xmlFuzzReadEntities();
|
xmlFuzzReadEntities();
|
||||||
|
|||||||
Reference in New Issue
Block a user