diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-11-27 03:47:06 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-11-27 03:47:06 +0000 |
commit | 8e9b2075ba1d6ce2ab82c2eb2547e2c2ef3ecca8 (patch) | |
tree | de7fba86c989c6f7df1d6d7bac078813d0855fa3 /nscd/grpcache.c | |
parent | f4efd06825ba5fec62662be611d94335eff4f8f7 (diff) | |
download | glibc-8e9b2075ba1d6ce2ab82c2eb2547e2c2ef3ecca8.zip glibc-8e9b2075ba1d6ce2ab82c2eb2547e2c2ef3ecca8.tar.gz glibc-8e9b2075ba1d6ce2ab82c2eb2547e2c2ef3ecca8.tar.bz2 |
Update.
2001-11-21 Bruno Haible <bruno@clisp.org>
* charmaps/ISO-8859-16: Swap 0xa5 and 0xab entries.
Diffstat (limited to 'nscd/grpcache.c')
-rw-r--r-- | nscd/grpcache.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nscd/grpcache.c b/nscd/grpcache.c index 93a7a0d..05ba40e 100644 --- a/nscd/grpcache.c +++ b/nscd/grpcache.c @@ -246,8 +246,18 @@ addgrbygid (struct database *db, int fd, request_header *req, char *buffer = alloca (buflen); struct group resultbuf; struct group *grp; - gid_t gid = atol (key); uid_t oldeuid = 0; + char *ep; + gid_t gid = strtoul ((char *)key, &ep, 10); + + if (*(char*)key == '\0' || *ep != '\0') /* invalid numeric gid */ + { + if (debug_level > 0) + dbg_log (_("Invalid numeric gid \"%s\"!"), (char *)key); + + errno = EINVAL; + return; + } if (debug_level > 0) dbg_log (_("Haven't found \"%d\" in group cache!"), gid); |