projects
/
platform
/
upstream
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a7fc63
)
(__argp_error, __argp_failure): Check result of __asprintf call and don't use string...
author
Ulrich Drepper
<drepper@redhat.com>
Tue, 1 Jun 2004 22:15:24 +0000
(22:15 +0000)
committer
Ulrich Drepper
<drepper@redhat.com>
Tue, 1 Jun 2004 22:15:24 +0000
(22:15 +0000)
argp/argp-help.c
patch
|
blob
|
history
diff --git
a/argp/argp-help.c
b/argp/argp-help.c
index
1921e52
..
6701870
100644
(file)
--- a/
argp/argp-help.c
+++ b/
argp/argp-help.c
@@
-1768,7
+1768,8
@@
__argp_error (const struct argp_state *state, const char *fmt, ...)
{
char *buf;
- __asprintf (&buf, fmt, ap);
+ if (__asprintf (&buf, fmt, ap) < 0)
+ buf = NULL;
__fwprintf (stream, L"%s: %s\n",
state ? state->name : __argp_short_program_name (),
@@
-1846,7
+1847,8
@@
__argp_failure (const struct argp_state *state, int status, int errnum,
{
char *buf;
- __asprintf (&buf, fmt, ap);
+ if (__asprintf (&buf, fmt, ap) < 0)
+ buf = NULL;
__fwprintf (stream, L": %s", buf);