1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-26 00:37:43 +03:00

Improve HTML fuzzer stability

Call htmlInitAutoClose during fuzzer initialization to fix stability
issue. Leave a note concerning problems with this function.
This commit is contained in:
Nick Wellnhofer
2021-02-22 12:25:29 +01:00
parent 09320f0551
commit de1b51eddc
2 changed files with 6 additions and 0 deletions

View File

@@ -6,12 +6,14 @@
#include <libxml/HTMLparser.h>
#include <libxml/HTMLtree.h>
#include <libxml/parserInternals.h>
#include "fuzz.h"
int
LLVMFuzzerInitialize(int *argc ATTRIBUTE_UNUSED,
char ***argv ATTRIBUTE_UNUSED) {
xmlInitParser();
htmlInitAutoClose();
xmlSetGenericErrorFunc(NULL, xmlFuzzErrorFunc);
return 0;