This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch for Bug #1188


Hi,

The following patch is correct should be applied to glibc 2.3 
and head:

2005-08-10  Sergio Gelato  <Sergio.Gelato@astro.su.se>

	[BZ #1188]
	* nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Change assert check 
	from (len > 0) to (len >= 0).

--- nis/nss_nis/nis-netgrp.c
+++ nis/nss_nis/nis-netgrp.c
@@ -75,7 +75,7 @@ _nss_nis_setnetgrent (const char *group,
 	 which is one byte larger than the value in LEN specifies
 	 and the last byte is filled with NUL.  So we can simply
 	 use that buffer.  */
-      assert (len > 0);
+      assert (len >= 0);
       assert (malloc_usable_size (netgrp->data) >= len + 1);
       assert (netgrp->data[len] == '\0');
 

-- 
Thorsten Kukuk         http://www.suse.de/~kukuk/      kukuk@suse.de
SUSE LINUX Products GmbH       Maxfeldstr. 5       D-90409 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]