]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
eeek, append 1 on the right place as otherwise we didn't fix the problem
authorDaniel Stenberg <daniel@haxx.se>
Tue, 14 Oct 2008 09:12:44 +0000 (09:12 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 14 Oct 2008 09:12:44 +0000 (09:12 +0000)
src/urlglob.c

index b133fb0e8b565dafcc300871e75bc71c42f08c9b..5f9a3e5e65569e51e0054b678e8cf14c969dfe1f 100644 (file)
@@ -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;