From 2b622324b146ce341c82ed384e3fff286ebfce11 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Tue, 3 Dec 2013 16:41:07 +0000 Subject: Release 10.47.47 git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@2044 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/util/vasprintf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/util/vasprintf.c b/lib/util/vasprintf.c index 6d350f88..47b4079d 100644 --- a/lib/util/vasprintf.c +++ b/lib/util/vasprintf.c @@ -18,9 +18,11 @@ vasprintfN(const char ** const resultP, char * result; #if HAVE_VASPRINTF - vasprintf(&result, format, varargs); + int rc; - if (result == NULL) + rc = vasprintf(&result, format, varargs); + + if (rc < 0) *resultP = strsol; else *resultP = result; -- cgit 1.4.1