File nscd-netgroupcache.patch of Package glibc.8004

2014-03-12  Siddhesh Poyarekar  <siddhesh@redhat.com>

	[BZ #16695]
	* nscd/netgroupcache.c (addgetnetgrentX): Factor in space for
	key in the buffer.

Index: glibc-2.19/nscd/netgroupcache.c
===================================================================
--- glibc-2.19.orig/nscd/netgroupcache.c
+++ glibc-2.19/nscd/netgroupcache.c
@@ -202,7 +202,7 @@ addgetnetgrentX (struct database_dyn *db
 		  {
 		    int e;
 		    status = getfct.f (&data, buffer + buffilled,
-				       buflen - buffilled, &e);
+				       buflen - buffilled - req->key_len, &e);
 		    if (status == NSS_STATUS_RETURN
 			|| status == NSS_STATUS_NOTFOUND)
 		      /* This was either the last one for this group or the
openSUSE Build Service is sponsored by