]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(nscd_getgr_r): Don't count the alloca'ed memory for buffer.
authorUlrich Drepper <drepper@redhat.com>
Mon, 30 Aug 1999 19:14:30 +0000 (19:14 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 30 Aug 1999 19:14:30 +0000 (19:14 +0000)
nscd/nscd_getgr_r.c

index 5ca16308802e4b73f01742b61e1b2dff7c762447..eb717056ea2994355788a831daed7e13f8e01b8c 100644 (file)
@@ -180,7 +180,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
       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)