aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--nscd/netgroupcache.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b7e0a0..001141c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;