projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5fc511
)
vasprintf: return -1 on strdup failure
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 10 Feb 2013 22:03:38 +0000
(23:03 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 10 Feb 2013 22:03:38 +0000
(23:03 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/platform.c
patch
|
blob
|
history
diff --git
a/libbb/platform.c
b/libbb/platform.c
index d241d25a7679d4bb89efc2b7ee5b013e1c74620b..19734517b13bddfc7c606301019e2f93ae9ffb5d 100644
(file)
--- a/
libbb/platform.c
+++ b/
libbb/platform.c
@@
-33,7
+33,7
@@
int FAST_FUNC vasprintf(char **string_ptr, const char *format, va_list p)
if (r < 128) {
va_end(p2);
*string_ptr = strdup(buf);
- return
r
;
+ return
(*string_ptr ? r : -1)
;
}
*string_ptr = malloc(r+1);