mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
1999-11-10 Andreas Jaeger <aj@suse.de> * string/strsignal.c (strsignal): Correct check for snprintf return value. * argp/argp-fmtstream.c (__argp_fmtstream_printf): Likewise. * misc/efgcvt_r.c (APPEND): Correct check for too small buffer according to changed snprintf return value. Reported by Lawrence K. Chen <lchen@opentext.com>. * misc/tst-efgcvt.c (special): Add tests for a too small buffer for ecvt_r and fcvt_r.
This commit is contained in:
@ -101,7 +101,8 @@ APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len)
|
||||
|
||||
n = __snprintf (buf, len, "%.*" FLOAT_FMT_FLAG "f", MIN (ndigit, NDIGIT_MAX),
|
||||
value);
|
||||
if (n < 0)
|
||||
/* Check for a too small buffer. */
|
||||
if (n >= len)
|
||||
return -1;
|
||||
|
||||
i = 0;
|
||||
|
Reference in New Issue
Block a user