vasprintf bugs

Eric Blake ebb9@byu.net
Tue Mar 13 13:25:00 GMT 2007


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




More information about the Newlib mailing list