SHA256
3
0
forked from pool/glibc
glibc/netgroup-cache-keys.patch

20 lines
637 B
Diff
Raw Normal View History

2018-03-01 DJ Delorie <dj@delorie.com>
[BZ #22342]
* nscd/netgroupcache.c (addinnetgrX): Include trailing NUL in
key value.
Index: glibc-2.27/nscd/netgroupcache.c
===================================================================
--- glibc-2.27.orig/nscd/netgroupcache.c
+++ glibc-2.27/nscd/netgroupcache.c
@@ -480,7 +480,7 @@ addinnetgrX (struct database_dyn *db, in
{
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;