summaryrefslogtreecommitdiff
path: root/source/l/expat/5f100ffa78b74da8020b71d1582a8979193c1359.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/expat/5f100ffa78b74da8020b71d1582a8979193c1359.patch')
-rw-r--r--source/l/expat/5f100ffa78b74da8020b71d1582a8979193c1359.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/source/l/expat/5f100ffa78b74da8020b71d1582a8979193c1359.patch b/source/l/expat/5f100ffa78b74da8020b71d1582a8979193c1359.patch
new file mode 100644
index 00000000..59404f30
--- /dev/null
+++ b/source/l/expat/5f100ffa78b74da8020b71d1582a8979193c1359.patch
@@ -0,0 +1,45 @@
+From 85a6f8fcdb2bc1530934f8cf684bdab86f1f2a1c Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Thu, 20 Jan 2022 04:41:47 +0100
+Subject: [PATCH] xmlwf: Fix a memory leak on output file opening error
+
+---
+ expat/Changes | 6 ++++++
+ expat/xmlwf/xmlwf.c | 4 ++--
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/expat/Changes b/expat/Changes
+index 64d75d05..5ff5da5e 100644
+--- a/expat/Changes
++++ b/expat/Changes
+@@ -11,8 +11,14 @@ Release x.x.x xxx xxxxxxx xx xxxx
+ common and default).
+ Impact is denial of service or more.
+
++ Bug fixes:
++ #544 #545 xmlwf: Fix a memory leak on output file opening error
++
+ Special thanks to:
++ hwt0415
+ Samanta Navarro
++ and
++ Clang LeakSan and the Clang team
+
+ Release 2.4.3 Sun January 16 2022
+ Security fixes:
+diff --git a/expat/xmlwf/xmlwf.c b/expat/xmlwf/xmlwf.c
+index 29118bb6..b6f300b0 100644
+--- a/expat/xmlwf/xmlwf.c
++++ b/expat/xmlwf/xmlwf.c
+@@ -1175,9 +1175,9 @@ tmain(int argc, XML_Char **argv) {
+ if (! userData.fp) {
+ tperror(outName);
+ exitCode = XMLWF_EXIT_OUTPUT_ERROR;
++ free(outName);
++ XML_ParserFree(parser);
+ if (continueOnError) {
+- free(outName);
+- cleanupUserData(&userData);
+ continue;
+ } else {
+ break;