mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-28 23:14:57 +03:00
build: Fix build when certain modules are disabled
This commit is contained in:
@@ -58,6 +58,7 @@ LLVMFuzzerTestOneInput(const char *data, size_t size) {
|
||||
|
||||
/* Push parser */
|
||||
|
||||
#ifdef LIBXML_PUSH_ENABLED
|
||||
xmlFuzzMemSetLimit(maxAlloc);
|
||||
ctxt = xmlCreatePushParserCtxt(NULL, NULL, NULL, 0, docUrl);
|
||||
if (ctxt == NULL)
|
||||
@@ -70,6 +71,7 @@ LLVMFuzzerTestOneInput(const char *data, size_t size) {
|
||||
chunkSize = maxChunkSize;
|
||||
xmlParseChunk(ctxt, docBuffer + consumed, chunkSize, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
xmlParseChunk(ctxt, NULL, 0, 1);
|
||||
xmlFreeDoc(ctxt->myDoc);
|
||||
|
||||
Reference in New Issue
Block a user