diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-06-01 22:18:24 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-06-01 22:18:24 +0000 |
commit | 322861e8b62dbca030a66f9ab37e6688b223c65f (patch) | |
tree | 4ee930f44d4484f577cae54b3845e91ae6517d57 /stdio-common | |
parent | 9ddfc0595a4444ee13aec46e118b3b3463012267 (diff) | |
download | glibc-322861e8b62dbca030a66f9ab37e6688b223c65f.tar glibc-322861e8b62dbca030a66f9ab37e6688b223c65f.tar.gz glibc-322861e8b62dbca030a66f9ab37e6688b223c65f.tar.bz2 glibc-322861e8b62dbca030a66f9ab37e6688b223c65f.zip |
Update.
2004-05-07 Dmitry V. Levin <ldv@altlinux.org>
* argp/argp-help.c (__argp_error, __argp_failure): Check result
of __asprintf call and don't use string if it failed.
* stdio-common/psignal.c (psignal): Likewise.
* locale/programs/localedef.c (more_help): Likewise.
* resolv/res_hconf.c (arg_service_list, arg_trimdomain_list,
arg_bool, parse_line): Check result of __asprintf calls and
don't use string if they failed.
* sunrpc/svc_simple.c (registerrpc, universal): Likewise.
* elf/ldconfig.c (parse_conf_include): Check result of __asprintf
call and exit if it failed.
Diffstat (limited to 'stdio-common')
-rw-r--r-- | stdio-common/psignal.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/stdio-common/psignal.c b/stdio-common/psignal.c index 0764af536b..3a75224b78 100644 --- a/stdio-common/psignal.c +++ b/stdio-common/psignal.c @@ -57,7 +57,13 @@ psignal (int sig, const char *s) { char *buf; - (void) __asprintf (&buf, _("%s%sUnknown signal %d\n"), s, colon, sig); + if (__asprintf (&buf, _("%s%sUnknown signal %d\n"), s, colon, sig) < 0) + { + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s%s%s\n", s, colon, _("Unknown signal")); + else + (void) fprintf (stderr, "%s%s%s\n", s, colon, _("Unknown signal")); + } if (_IO_fwide (stderr, 0) > 0) (void) __fwprintf (stderr, L"%s", buf); |