From: Daniel Stenberg Date: Tue, 14 Oct 2008 09:12:44 +0000 (+0000) Subject: eeek, append 1 on the right place as otherwise we didn't fix the problem X-Git-Tag: curl-7_19_1~157 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7e71a249edf3c3215413ed75269d27f86a9e5a5;p=thirdparty%2Fcurl.git eeek, append 1 on the right place as otherwise we didn't fix the problem --- diff --git a/src/urlglob.c b/src/urlglob.c index b133fb0e8b..5f9a3e5e65 100644 --- a/src/urlglob.c +++ b/src/urlglob.c @@ -551,8 +551,8 @@ char *glob_match_url(char *filename, URLGlob *glob) char *newstr; /* we append a single byte to allow for the trailing byte to be appended at the end of this function outside the while() loop */ - allocsize = (appendlen + stringlen)*2 + 1; - newstr=realloc(target, allocsize); + allocsize = (appendlen + stringlen)*2; + newstr=realloc(target, allocsize + 1); if(NULL ==newstr) { free(target); return NULL;