A new patch for nscd.

H.J. Lu hjl@varesearch.com
Sat Aug 28 17:30:00 GMT 1999


Here is the revised patch for nscd.


-- 
H.J. Lu (hjl@gnu.org)
---
Sat Aug 28 17:29:05 1999  H.J. Lu  <hjl@gnu.org>

	* nscd/nscd_getgr_r.c (nscd_getgr_r): Don't count the alloca'ed
	memory for buffer.

Index: nscd/nscd_getgr_r.c
===================================================================
RCS file: /work/cvs/gnu/glibc-2.1/nscd/nscd_getgr_r.c,v
retrieving revision 1.1.1.14
diff -u -p -r1.1.1.14 nscd_getgr_r.c
--- nscd/nscd_getgr_r.c	1999/06/27 01:14:33	1.1.1.14
+++ nscd/nscd_getgr_r.c	1999/08/29 00:28:12
@@ -180,7 +180,7 @@ nscd_getgr_r (const char *key, size_t ke
       vec[1].iov_len = gr_resp.gr_name_len + gr_resp.gr_passwd_len;
       total_len += gr_resp.gr_name_len + gr_resp.gr_passwd_len;
 
-      buflen -= total_len;
+      buflen -= gr_resp.gr_name_len + gr_resp.gr_passwd_len;
 
       /* Get this data.  */
       if (__readv (sock, vec, 2) != total_len)


More information about the Libc-hacker mailing list