commit | 7ceaee9430ca24bda7f2480f387dbebfc259002a | [log] [tgz] |
---|---|---|
author | Nick Wellnhofer <wellnhofer@aevum.de> | Wed Nov 02 16:05:05 2022 +0100 |
committer | Nick Wellnhofer <wellnhofer@aevum.de> | Wed Nov 02 16:05:05 2022 +0100 |
tree | 96a6179a34099211e0ee822121cea79413ec8fbe | |
parent | e129c1d1a27abdeaab44f4d59eb0cb5052df7c6f [diff] |
malloc-fail: Fix memory leak in xmlSAX2ExternalSubset Found with libFuzzer, see #344.
diff --git a/SAX2.c b/SAX2.c index 3d75751..44c6b8c 100644 --- a/SAX2.c +++ b/SAX2.c
@@ -415,6 +415,7 @@ xmlMalloc(5 * sizeof(xmlParserInputPtr)); if (ctxt->inputTab == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2ExternalSubset"); + xmlFreeInputStream(input); ctxt->input = oldinput; ctxt->inputNr = oldinputNr; ctxt->inputMax = oldinputMax;