This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Question about malloc_useable_size
- From: Thorsten Kukuk <kukuk at suse dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 10 Jun 2005 15:35:57 +0200
- Subject: Question about malloc_useable_size
Hi,
this is about Bug #962 and Ulis changes in nis-netgrp.c:
nis-netgrp.c contains the following code:
assert (len > 0);
assert (malloc_usable_size (netgrp->data) >= len + 1);
assert (netgrp->data[len] == '\0');
netgrp->data was created with malloc (len + 1); But there is a
report (see Bug #962), that the assert sometimes fails with
malloc_usable_size (netgrp->data) reporting 992, while len is 1002.
How can this happen?
Thanks,
Thorsten
--
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