summaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-11-10 08:15:19 +0000
committerUlrich Drepper <drepper@redhat.com>1999-11-10 08:15:19 +0000
commitb9d3d9f726a79f0c1091e80cfb21e27eaed130c0 (patch)
treeb4bffa1c2f8ab000bc31b745dfbfab91f6410c4d /string
parent2864e767053317538feafa815046fff89e5a16be (diff)
downloadglibc-b9d3d9f726a79f0c1091e80cfb21e27eaed130c0.tar.gz
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.
Diffstat (limited to 'string')
-rw-r--r--string/strsignal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string/strsignal.c b/string/strsignal.c
index 1a13707e37..a9d7233ec8 100644
--- a/string/strsignal.c
+++ b/string/strsignal.c
@@ -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';