diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | nscd/netgroupcache.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2018-03-01 DJ Delorie <dj@delorie.com> + + [BZ #22342] + * nscd/netgroupcache.c (addinnetgrX): Include trailing NUL in + key value. + 2018-03-01 Maciej W. Rozycki <macro@mips.com> * nptl_db/td_ta_thr_iter.c (iterate_thread_list): Remove diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c index b832c93..2f187b2 100644 --- a/nscd/netgroupcache.c +++ b/nscd/netgroupcache.c @@ -480,7 +480,7 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req, { const char *group = key; key = (char *) rawmemchr (key, '\0') + 1; - size_t group_len = key - group - 1; + size_t group_len = key - group; const char *host = *key++ ? key : NULL; if (host != NULL) key = (char *) rawmemchr (key, '\0') + 1; |