diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-10-14 09:12:44 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-10-14 09:12:44 +0000 |
commit | b7e71a249edf3c3215413ed75269d27f86a9e5a5 (patch) | |
tree | a53dbda7789408fb2c4bf4c66677e80342c65a38 | |
parent | bf8d642607f49355d22e47eca09a79485a3fd1a9 (diff) |
eeek, append 1 on the right place as otherwise we didn't fix the problem
-rw-r--r-- | src/urlglob.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/urlglob.c b/src/urlglob.c index b133fb0e8..5f9a3e5e6 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; |