[libxml2] Fix memory leak in xmlLoadEntityContent error path
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix memory leak in xmlLoadEntityContent error path
- Date: Tue, 28 Jun 2022 17:42:25 +0000 (UTC)
commit ca2c91f139426f63646292da58a15a1511dccc0f
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Tue Jun 28 19:24:14 2022 +0200
Fix memory leak in xmlLoadEntityContent error path
Free the input stream if pushing it fails.
Found by OSS-Fuzz.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43743
parser.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/parser.c b/parser.c
index 0464a302..d278638d 100644
--- a/parser.c
+++ b/parser.c
@@ -8088,6 +8088,7 @@ xmlLoadEntityContent(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
*/
if (xmlPushInput(ctxt, input) < 0) {
xmlBufferFree(buf);
+ xmlFreeInputStream(input);
return(-1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]