mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-25 10:50:08 +03:00
fuzz: Rework fixed parser options
Remove XML_PARSE_XINCLUDE. This is only honored by the XML Reader interface which is now fuzzed in reader.c. Don't validate in XInclude fuzzer. This doesn't increase coverage after moving the Reader fuzzer.
This commit is contained in:
parent
44628d4559
commit
6f903d434f
@ -33,7 +33,6 @@ LLVMFuzzerTestOneInput(const char *data, size_t size) {
|
||||
|
||||
xmlFuzzDataInit(data, size);
|
||||
opts = (int) xmlFuzzReadInt(4);
|
||||
opts &= ~XML_PARSE_XINCLUDE;
|
||||
opts |= XML_PARSE_DTDVALID;
|
||||
failurePos = xmlFuzzReadInt(4) % (size + 100);
|
||||
|
||||
|
@ -35,7 +35,8 @@ LLVMFuzzerTestOneInput(const char *data, size_t size) {
|
||||
|
||||
xmlFuzzDataInit(data, size);
|
||||
opts = (int) xmlFuzzReadInt(4);
|
||||
opts |= XML_PARSE_XINCLUDE;
|
||||
opts &= ~XML_PARSE_DTDVALID &
|
||||
~XML_PARSE_SAX1;
|
||||
failurePos = xmlFuzzReadInt(4) % (size + 100);
|
||||
|
||||
xmlFuzzReadEntities();
|
||||
|
@ -47,8 +47,7 @@ LLVMFuzzerTestOneInput(const char *data, size_t size) {
|
||||
/*
|
||||
* Disable options that are known to cause timeouts
|
||||
*/
|
||||
opts &= ~XML_PARSE_XINCLUDE &
|
||||
~XML_PARSE_DTDVALID &
|
||||
opts &= ~XML_PARSE_DTDVALID &
|
||||
~XML_PARSE_SAX1;
|
||||
failurePos = xmlFuzzReadInt(4) % (size + 100);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user