summaryrefslogtreecommitdiff
path: root/debian/patches/0043-xmlcatalog-Fix-a-memory-leak-on-quit.patch
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2015-08-25 22:30:28 +0200
committerRaphaël Hertzog <hertzog@debian.org>2015-08-25 22:33:39 +0200
commit37f590756a23e167808f76f1389c36f0a2d39f11 (patch)
treeeac97bc22ada158533631911302acb1aa6682195 /debian/patches/0043-xmlcatalog-Fix-a-memory-leak-on-quit.patch
parent3b14c3fd6410716d407178e48972b1c1bea48c29 (diff)
downloadlibxml2-37f590756a23e167808f76f1389c36f0a2d39f11.tar.gz
Restore all patches available in 2.9.1+dfsg1-5 in stretch, ensuring CVE-2014-3660 is fixed too.
Diffstat (limited to 'debian/patches/0043-xmlcatalog-Fix-a-memory-leak-on-quit.patch')
-rw-r--r--debian/patches/0043-xmlcatalog-Fix-a-memory-leak-on-quit.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/0043-xmlcatalog-Fix-a-memory-leak-on-quit.patch b/debian/patches/0043-xmlcatalog-Fix-a-memory-leak-on-quit.patch
new file mode 100644
index 0000000..c0151db
--- /dev/null
+++ b/debian/patches/0043-xmlcatalog-Fix-a-memory-leak-on-quit.patch
@@ -0,0 +1,34 @@
+From: Philip Withnall <philip.withnall@collabora.co.uk>
+Date: Fri, 20 Jun 2014 21:05:33 +0100
+Subject: xmlcatalog: Fix a memory leak on quit
+
+Coverity issue: #60442
+
+https://bugzilla.gnome.org/show_bug.cgi?id=731990
+---
+ xmlcatalog.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/xmlcatalog.c b/xmlcatalog.c
+index 43f455a..b9ed6a4 100644
+--- a/xmlcatalog.c
++++ b/xmlcatalog.c
+@@ -181,12 +181,13 @@ static void usershell(void) {
+ /*
+ * start interpreting the command
+ */
+- if (!strcmp(command, "exit"))
+- break;
+- if (!strcmp(command, "quit"))
+- break;
+- if (!strcmp(command, "bye"))
++ if (!strcmp(command, "exit") ||
++ !strcmp(command, "quit") ||
++ !strcmp(command, "bye")) {
++ free(cmdline);
+ break;
++ }
++
+ if (!strcmp(command, "public")) {
+ if (nbargs != 1) {
+ printf("public requires 1 arguments\n");