]> git.pld-linux.org Git - packages/glibc.git/blame - glibc-git.patch
- missing patch
[packages/glibc.git] / glibc-git.patch
CommitLineData
65d1f28f
AM
1commit c8fc0c91695b1c7003c7170861274161f9224817
2Author: Ulrich Drepper <drepper@gmail.com>
3Date: Tue May 31 08:45:44 2011 -0400
4
5 Don't free non-malloced memory and fix memory leak
6
7diff --git a/ChangeLog b/ChangeLog
8index 3a6abda..eee3d1b 100644
9--- a/ChangeLog
10+++ b/ChangeLog
11@@ -1,3 +1,8 @@
12+2011-05-31 Andreas Schwab <schwab@redhat.com>
13+
14+ * nscd/nscd_getserv_r.c (nscd_getserv_r): Don't free non-malloced
15+ memory. Use alloca_account. Fix memory leak when retrying.
16+
17 2011-05-31 Ulrich Drepper <drepper@gmail.com>
18
19 * version.h (RELEASE): Bump for 2.14 release.
20diff --git a/nscd/nscd_getserv_r.c b/nscd/nscd_getserv_r.c
21index de96a57..f9ef056 100644
22--- a/nscd/nscd_getserv_r.c
23+++ b/nscd/nscd_getserv_r.c
24@@ -124,6 +124,7 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
25 s_name = (char *) (&found->data[0].servdata + 1);
26 serv_resp = found->data[0].servdata;
27 s_proto = s_name + serv_resp.s_name_len;
28+ alloca_aliases_len = 1;
29 aliases_len = (uint32_t *) (s_proto + serv_resp.s_proto_len);
30 aliases_list = ((char *) aliases_len
31 + serv_resp.s_aliases_cnt * sizeof (uint32_t));
32@@ -154,7 +155,9 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
33 + (serv_resp.s_aliases_cnt
34 * sizeof (uint32_t)));
35 if (alloca_aliases_len)
36- tmp = __alloca (serv_resp.s_aliases_cnt * sizeof (uint32_t));
37+ tmp = alloca_account (serv_resp.s_aliases_cnt
38+ * sizeof (uint32_t),
39+ alloca_used);
40 else
41 {
42 tmp = malloc (serv_resp.s_aliases_cnt * sizeof (uint32_t));
43@@ -249,8 +252,9 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
44 + (serv_resp.s_aliases_cnt
45 * sizeof (uint32_t)));
46 if (alloca_aliases_len)
47- aliases_len = alloca (serv_resp.s_aliases_cnt
48- * sizeof (uint32_t));
49+ aliases_len = alloca_account (serv_resp.s_aliases_cnt
50+ * sizeof (uint32_t),
51+ alloca_used);
52 else
53 {
54 aliases_len = malloc (serv_resp.s_aliases_cnt
55@@ -368,7 +372,11 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
56 }
57
58 if (retval != -1)
59- goto retry;
60+ {
61+ if (!alloca_aliases_len)
62+ free (aliases_len);
63+ goto retry;
64+ }
65 }
66
67 if (!alloca_aliases_len)
68commit 8c29731192565b9c917d6b97db78dcd302283df8
69Author: Ulrich Drepper <drepper@gmail.com>
70Date: Tue May 31 14:23:01 2011 -0400
71
72 Fix typo in stack guard setup code for old kernels
73
74diff --git a/ChangeLog b/ChangeLog
75index eee3d1b..2aca74a 100644
76--- a/ChangeLog
77+++ b/ChangeLog
78@@ -1,3 +1,8 @@
79+2011-05-31 Ulrich Drepper <drepper@gmail.com>
80+
81+ * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard): Fix
82+ typo.
83+
84 2011-05-31 Andreas Schwab <schwab@redhat.com>
85
86 * nscd/nscd_getserv_r.c (nscd_getserv_r): Don't free non-malloced
87diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h
88index eb7fedc..28fce4f 100644
89--- a/sysdeps/unix/sysv/linux/dl-osinfo.h
90+++ b/sysdeps/unix/sysv/linux/dl-osinfo.h
91@@ -81,7 +81,7 @@ _dl_setup_stack_chk_guard (void *dl_random)
92 {
93 ssize_t reslen = read_not_cancel (fd, ret.bytes + 1, filllen);
94 close_not_cancel_no_status (fd);
95- if (reslen == (ssize_) filllen)
96+ if (reslen == (ssize_t) filllen)
97 return ret.num;
98 }
99 # endif
This page took 0.045029 seconds and 4 git commands to generate.