aboutsummaryrefslogtreecommitdiff
path: root/nscd/connections.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2013-06-10 14:39:09 +0200
committerAndreas Schwab <schwab@suse.de>2013-06-11 11:29:50 +0200
commit50fd745b4dec07e8e213cf2703b5cabcfa128225 (patch)
treec0341dcf5c4f3275cded07abeec6eefb3e427959 /nscd/connections.c
parent3ee7e9fe34a96cfbf2d39879c21eb36e70471ad1 (diff)
downloadglibc-50fd745b4dec07e8e213cf2703b5cabcfa128225.tar
glibc-50fd745b4dec07e8e213cf2703b5cabcfa128225.tar.gz
glibc-50fd745b4dec07e8e213cf2703b5cabcfa128225.tar.bz2
glibc-50fd745b4dec07e8e213cf2703b5cabcfa128225.zip
Fix handling of netgroup cache in nscd
Diffstat (limited to 'nscd/connections.c')
-rw-r--r--nscd/connections.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index 7099215916..69e3e7dc08 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -1779,7 +1779,7 @@ nscd_run_worker (void *p)
else
{
/* Get the key. */
- char keybuf[MAXKEYLEN];
+ char keybuf[MAXKEYLEN + 1];
if (__builtin_expect (TEMP_FAILURE_RETRY (read (fd, keybuf,
req.key_len))
@@ -1791,6 +1791,7 @@ nscd_run_worker (void *p)
strerror_r (errno, buf, sizeof (buf)));
goto close_and_out;
}
+ keybuf[req.key_len] = '\0';
if (__builtin_expect (debug_level, 0) > 0)
{