1
0
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:
Nick Wellnhofer
2023-09-21 01:29:40 +02:00
parent 9b5cce7a71
commit da274bfa55
9 changed files with 35 additions and 11 deletions

View File

@@ -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);