1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +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

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
/* Copyright (C) 1991, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -70,7 +70,7 @@ strsignal (int signum)
#endif
len = __snprintf (buffer, BUFFERSIZ - 1, _("Unknown signal %d"),
signum);
if (len < 0)
if (len >= BUFFERSIZ)
buffer = NULL;
else
buffer[len] = '\0';