This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Here is a patch for the out-of-buffer bug in nscd. Thorsten, could you please double check other nscd functions? Thanks. -- H.J. Lu (hjl@gnu.org) -- Fri Aug 27 19:01:25 1999 H.J. Lu <hjl@gnu.org> * nscd/nscd_getgr_r.c (nscd_getgr_r): Check the out-of-buffer case. 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/28 01:57:08 @@ -180,6 +180,9 @@ 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; + if (total_len > buflen) + goto no_room; + buflen -= total_len; /* Get this data. */
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |