[U-Boot] [PATCH] Prevent malloc with size 0
Mike Frysinger
vapier at gentoo.org
Mon Apr 2 05:12:34 CEST 2012
On Sunday 01 April 2012 20:25:44 Graeme Russ wrote:
> b) The code calling malloc(0) is making a perfectly legitimate assumption
> based on how glibc handles malloc(0)
not really. POSIX says malloc(0) is implementation defined (so it may return a
unique address, or it may return NULL). no userspace code assuming malloc(0)
will return non-NULL is correct.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120401/b120f6af/attachment.pgp>
More information about the U-Boot
mailing list