[SCM] BOINC packaging branch, master, updated. debian/6.10.17+dfsg-3-420-g1e5544f

Steffen Moeller moeller at debian.org
Sun Mar 18 13:45:20 UTC 2012


The following commit has been merged in the master branch:
commit 1e5544fae77aafba67c5b28ce7c1c1c35000ef53
Author: Steffen Moeller <moeller at debian.org>
Date:   Sun Mar 18 14:44:05 2012 +0100

    Improved memory handling.

diff --git a/debian/patches/fix_realloc_use.patch b/debian/patches/fix_realloc_use.patch
new file mode 100644
index 0000000..6fba7fd
--- /dev/null
+++ b/debian/patches/fix_realloc_use.patch
@@ -0,0 +1,18 @@
+Index: boinc/lib/parse.cpp
+===================================================================
+--- boinc.orig/lib/parse.cpp	2012-03-18 13:57:51.000000000 +0100
++++ boinc/lib/parse.cpp	2012-03-18 14:18:55.000000000 +0100
+@@ -179,9 +179,10 @@
+         int n = (int)strlen(line);
+         if (nused + n >= bufsize) {
+             bufsize *= 2;
+-            char *b = (char*)realloc(buf, bufsize);
+-            if (!b) {
+-                free(buf);
++            char *b = buf;
++            buf = (char*)realloc(b, bufsize);
++            if (!buf) {
++                free(b); // b was buf and was allocated in this fun
+                 return ERR_XML_PARSE;
+             }
+         }
diff --git a/debian/patches/series b/debian/patches/series
index e79c6f3..bb3b736 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -25,3 +25,5 @@ parse_issues.patch
 client_stream_realloc.patch
 MoreInformativeAppStartFailure.patch
 MainDocumentWarnings.patch
+stream_memory_leak_fix.patch
+fix_realloc_use.patch
diff --git a/debian/patches/stream_memory_leak_fix.patch b/debian/patches/stream_memory_leak_fix.patch
new file mode 100644
index 0000000..bb16600
--- /dev/null
+++ b/debian/patches/stream_memory_leak_fix.patch
@@ -0,0 +1,13 @@
+Index: boinc/client/stream.cpp
+===================================================================
+--- boinc.orig/client/stream.cpp	2012-03-18 13:57:51.000000000 +0100
++++ boinc/client/stream.cpp	2012-03-18 14:09:11.000000000 +0100
+@@ -221,6 +221,8 @@
+   /* --- Check Results --- */
+   checkSTREAMresults(a,b,c);
+ 
++  /* --- Release prior allocated memory --- */
++  free(a); free(b); free(c);
+ }
+ 
+ # define M 20

-- 
BOINC packaging



More information about the pkg-boinc-commits mailing list