acadia-newlib/newlib/libc
Corinna Vinschen 9638c07527 newlib: vf[w]scanf: Drop width computation mixup
The width value keeps the maximum field width.  This is the maximum
field width of the *input*.  It's *never* to be used in conjunction
with the number of bytes or characters written to the output argument.

However, especially in vfwscanf, the code is partially taken from
NetBSD which erroneously subtracts the number of multibyte chars
written to the argument from the width variable, thus potentially
subtracting up to MB_CUR_MAX from width for a single character in
the input stream.

To make matters worse, the previous patch adding %m added basically
the same mistake for 'c' type input.

Fix it.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-01 13:47:26 +01:00
..
argz Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
ctype ctype: remove TRAD_SYNOPSIS 2017-12-01 03:41:50 -06:00
errno Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
iconv iconv: remove TRAD_SYNOPSIS 2017-12-01 03:41:50 -06:00
include ssp: add Object Size Checking for unistd.h, part 2 2017-12-01 03:41:49 -06:00
locale locale: remove TRAD_SYNOPSIS 2017-12-01 03:41:50 -06:00
machine powerpc: remove TRAD_SYNOPSIS 2017-12-01 03:41:50 -06:00
misc misc: remove TRAD_SYNOPSIS 2017-12-01 03:41:50 -06:00
posix posix: remove TRAD_SYNOPSIS 2017-12-01 03:41:50 -06:00
reent reent: remove TRAD_SYNOPSIS 2017-12-01 03:41:51 -06:00
search search: remove TRAD_SYNOPSIS 2017-12-01 03:41:51 -06:00
signal signal: remove TRAD_SYNOPSIS 2017-12-01 03:41:51 -06:00
ssp ssp: add Object Size Checking for unistd.h, part 2 2017-12-01 03:41:49 -06:00
stdio newlib: vf[w]scanf: Drop width computation mixup 2017-12-01 13:47:26 +01:00
stdio64 stdio64: remove TRAD_SYNOPSIS 2017-12-01 03:41:51 -06:00
stdlib stdlib: remove TRAD_SYNOPSIS 2017-12-01 03:41:52 -06:00
string string: remove TRAD_SYNOPSIS 2017-12-01 03:41:52 -06:00
sys sys: remove TRAD_SYNOPSIS 2017-12-01 03:41:52 -06:00
syscalls Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
time time: remove TRAD_SYNOPSIS 2017-12-01 03:41:53 -06:00
unix unix: remove TRAD_SYNOPSIS 2017-12-01 03:41:53 -06:00
xdr Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
Makefile.am ssp: add build infrastructure 2017-11-29 11:25:46 -06:00
Makefile.in ssp: add build infrastructure 2017-11-29 11:25:46 -06:00
aclocal.m4 Fix up errors in regenerated files for 2.3.0 release. 2016-01-04 12:57:31 -05:00
configure ssp: add build infrastructure 2017-11-29 11:25:46 -06:00
configure.in ssp: add build infrastructure 2017-11-29 11:25:46 -06:00
libc.in.xml ssp: add documentation 2017-11-29 11:25:45 -06:00
libc.texinfo ssp: add documentation 2017-11-29 11:25:45 -06:00
saber import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
sys.tex Don't include stdio64 functions in reentrant syscalls menu when not bulding stdio64. 2015-08-03 09:54:33 +01:00