This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: I: [PATCH] asprintf error handling fix
I've found the BSD man page and it explictly mentions setting the
buffer to NULl:
asprintf() and vasprintf() return a pointer to a buffer sufficiently
large to hold the string in the ret argument. This pointer should be
passed to free(3) to release the allocated storage when it is no longer
needed. If sufficient space cannot be allocated, these functions will
return -1 and set ret to be a null pointer.
IMO we should change glibc therefore to align with BSD,
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj