mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-28 23:14:57 +03:00
fuzz: Remove size limit, disable XInclude
Now that entity expansion issues should be fixed, we should get more interesting timeout errors from OSS-Fuzz. Disable XInclude for now, since it often timeouts in XPath computations. The XInclude tests should be moved to a separate fuzz target.
This commit is contained in:
@@ -33,16 +33,12 @@ LLVMFuzzerTestOneInput(const char *data, size_t size) {
|
||||
xmlTextReaderPtr reader;
|
||||
xmlChar *out;
|
||||
const char *docBuffer, *docUrl;
|
||||
size_t maxSize, docSize, consumed, chunkSize;
|
||||
size_t docSize, consumed, chunkSize;
|
||||
int opts, outSize;
|
||||
|
||||
xmlFuzzDataInit(data, size);
|
||||
opts = xmlFuzzReadInt();
|
||||
|
||||
/* Lower maximum size when processing entities for now. */
|
||||
maxSize = opts & XML_PARSE_NOENT ? 50000 : 500000;
|
||||
if (size > maxSize)
|
||||
goto exit;
|
||||
opts &= ~XML_PARSE_XINCLUDE;
|
||||
|
||||
xmlFuzzReadEntities();
|
||||
docBuffer = xmlFuzzMainEntity(&docSize);
|
||||
|
||||
Reference in New Issue
Block a user