1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00
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:
Ulrich Drepper
1999-11-10 08:15:19 +00:00
parent 2864e76705
commit b9d3d9f726
5 changed files with 41 additions and 9 deletions

View File

@ -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;