mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-27 18:50:07 +03:00
fuzz: Fix duplicate detection in fuzzEntityRecorder
Store a non-NULL value in the hash.
This commit is contained in:
parent
791a1e80b9
commit
f560065f4d
@ -82,7 +82,8 @@ fuzzEntityRecorder(const char *URL, const char *ID,
|
||||
|
||||
xmlFreeInputStream(in);
|
||||
|
||||
xmlHashAddEntry(globalData.entities, (const xmlChar *) URL, NULL);
|
||||
xmlHashAddEntry(globalData.entities, (const xmlChar *) URL,
|
||||
globalData.entities);
|
||||
|
||||
return(xmlNoNetExternalEntityLoader(URL, ID, ctxt));
|
||||
}
|
||||
@ -98,7 +99,7 @@ fuzzRecorderInit(FILE *out) {
|
||||
static void
|
||||
fuzzRecorderCleanup(void) {
|
||||
xmlSetExternalEntityLoader(globalData.oldLoader);
|
||||
xmlHashFree(globalData.entities, xmlHashDefaultDeallocator);
|
||||
xmlHashFree(globalData.entities, NULL);
|
||||
globalData.out = NULL;
|
||||
globalData.entities = NULL;
|
||||
globalData.oldLoader = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user