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

Steffen Moeller moeller at debian.org
Wed Mar 14 22:37:43 UTC 2012


The following commit has been merged in the master branch:
commit fa73840be46792b337d1fe4910f51b3104743ddd
Author: Steffen Moeller <moeller at debian.org>
Date:   Fri Mar 9 14:13:08 2012 +0100

    Better error detection.

diff --git a/debian/patches/parse_issues.patch b/debian/patches/parse_issues.patch
new file mode 100644
index 0000000..63d95ec
--- /dev/null
+++ b/debian/patches/parse_issues.patch
@@ -0,0 +1,52 @@
+Index: boinc/lib/parse.cpp
+===================================================================
+--- boinc.orig/lib/parse.cpp	2012-02-17 11:32:54.000000000 +0100
++++ boinc/lib/parse.cpp	2012-03-04 02:36:26.000000000 +0100
+@@ -179,7 +179,11 @@
+         int n = (int)strlen(line);
+         if (nused + n >= bufsize) {
+             bufsize *= 2;
+-            buf = (char*)realloc(buf, bufsize);
++            char *b = (char*)realloc(buf, bufsize);
++            if (!b) {
++                free(buf);
++                return ERR_XML_PARSE;
++            }
+         }
+         strcpy(buf+nused, line);
+         nused += n;
+Index: boinc/lib/procinfo_win.cpp
+===================================================================
+--- boinc.orig/lib/procinfo_win.cpp	2011-10-30 00:27:06.000000000 +0200
++++ boinc/lib/procinfo_win.cpp	2012-03-04 02:42:11.000000000 +0100
+@@ -24,13 +24,16 @@
+     tNTQSI   pNTQSI = (tNTQSI)GetProcAddress(hNTDllLib, "NtQuerySystemInformation");
+     ULONG    cbBuffer = 0;
+ 
++    if (!ppBuffer) return ERR_NULL;
++    if (!pcbBuffer) return ERR_NULL;
++
+     while (1) {
+         // Store the buffer size since it appears that somebody is monkeying around
+         //   with the return values on some systems.
+         cbBuffer = *pcbBuffer;
+ 
+         *ppBuffer = HeapAlloc(hHeap, HEAP_ZERO_MEMORY, *pcbBuffer);
+-        if (ppBuffer == NULL) {
++        if (*ppBuffer == NULL) {
+             return ERR_MALLOC;
+         }
+ 
+@@ -54,9 +57,9 @@
+         } else if (!NT_SUCCESS(Status)) {
+             HeapFree(hHeap, NULL, *ppBuffer);
+             return ERR_GETRUSAGE;
+-		} else {
+-			return 0;
+-		}
++        } else {
++            return 0;
++        }
+     }
+     return 0;	// never reached
+ }

-- 
BOINC packaging



More information about the pkg-boinc-commits mailing list