Gentoo Archives: gentoo-commits

From: "Justin Bronder (jsbronder)" <jsbronder@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-cluster/ganglia/files: ganglia-3.1.1-process_path-overflow-r1.patch ganglia-3.1.1-process_path-overflow.patch
Date: Tue, 20 Jan 2009 16:42:30
Message-Id: E1LPJgI-0004yl-Tq@stork.gentoo.org
1 jsbronder 09/01/20 16:42:26
2
3 Added: ganglia-3.1.1-process_path-overflow-r1.patch
4 Removed: ganglia-3.1.1-process_path-overflow.patch
5 Log:
6 Update the patch for ganglia bug #223 , Gentoo bug #255593. Remove old ganglia-3.1.1-r1 and associated patch.
7 (Portage version: 2.2_rc23/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 sys-cluster/ganglia/files/ganglia-3.1.1-process_path-overflow-r1.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/ganglia/files/ganglia-3.1.1-process_path-overflow-r1.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/ganglia/files/ganglia-3.1.1-process_path-overflow-r1.patch?rev=1.1&content-type=text/plain
14
15 Index: ganglia-3.1.1-process_path-overflow-r1.patch
16 ===================================================================
17 Index: gmetad/server.c
18 ===================================================================
19 --- gmetad/server.c (revision 1953)
20 +++ gmetad/server.c (working copy)
21 @@ -370,14 +370,13 @@
22
23 /* sacerdoti: This function does a tree walk while respecting the filter path.
24 * Will return valid XML even if we have chosen a subtree. Since tree depth is
25 - * bounded, this function guarantees O(1) search time. The recursive structure
26 - * does not require any memory allocations.
27 + * bounded, this function guarantees O(1) search time.
28 */
29 static int
30 process_path (client_t *client, char *path, datum_t *myroot, datum_t *key)
31 {
32 char *p, *q, *pathend;
33 - char element[256];
34 + char *element;
35 int rc, len;
36 datum_t *found;
37 datum_t findkey;
38 @@ -419,6 +418,9 @@
39 if (!q) q=pathend;
40
41 len = q-p;
42 + element = malloc(len + 1);
43 + if ( element == NULL )
44 + return 1;
45 strncpy(element, p, len);
46 element[len] = '\0';
47
48 @@ -440,6 +442,7 @@
49 {
50 rc = process_path(client, 0, myroot, NULL);
51 }
52 + free(element);
53 }
54 if (rc) return 1;
55
56 @@ -537,7 +540,7 @@
57 socklen_t len;
58 client_t client;
59 char remote_ip[16];
60 - char request[REQUESTLEN];
61 + char request[REQUESTLEN + 1];
62 llist_entry *le;
63 datum_t rootdatum;