diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-11-10 08:15:19 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-11-10 08:15:19 +0000 |
commit | b9d3d9f726a79f0c1091e80cfb21e27eaed130c0 (patch) | |
tree | b4bffa1c2f8ab000bc31b745dfbfab91f6410c4d /string | |
parent | 2864e767053317538feafa815046fff89e5a16be (diff) | |
download | glibc-b9d3d9f726a79f0c1091e80cfb21e27eaed130c0.zip glibc-b9d3d9f726a79f0c1091e80cfb21e27eaed130c0.tar.gz glibc-b9d3d9f726a79f0c1091e80cfb21e27eaed130c0.tar.bz2 |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/string/strsignal.c b/string/strsignal.c index 1a13707..a9d7233 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'; |