This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: vasprintf bugs
Eric Blake <ebb9 <at> byu.net> writes:
> 2007-03-12 Eric Blake <ebb9 <at> byu.net>
>
> * libc/stdio/makebuf.c (__smakebuf): Detect failed allocation with
> asprintf.
> * libc/stdio/wsetup.c (__swsetup): Likewise.
> * libc/stdio/vfprintf.c (_VFPRINTF_R): Set errno properly on
> failed asprintf allocation.
> * libc/stdio/fvwrite.c (__sfvwrite_r): Likewise.
> * libc/stdio/snprintf.c (snprintf, _snprintf_r): Report overflow,
> as required by POSIX.
I didn't get the overflow checks quite right. Hold off applying this until I
can resubmit (serves me right for just copy-n-pasting the non-_r versions
instead of testing)...
--
Eric Blake