From: Denys Vlasenko Date: Tue, 17 Nov 2009 04:33:47 +0000 (+0100) Subject: libbb: fix vasprintf implementation X-Git-Tag: 1_16_0~222 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=995f15452a265190c222442758a21fed2233ba14;p=oweals%2Fbusybox.git libbb: fix vasprintf implementation Signed-off-by: Denys Vlasenko --- diff --git a/libbb/platform.c b/libbb/platform.c index fdd388259..17ad3f75a 100644 --- a/libbb/platform.c +++ b/libbb/platform.c @@ -30,7 +30,8 @@ int FAST_FUNC vasprintf(char **string_ptr, const char *format, va_list p) if (r < 128) { va_end(p2); - return xstrdup(buf); + *string_ptr = xstrdup(buf); + return r; } *string_ptr = xmalloc(r+1);