eeek, append 1 on the right place as otherwise we didn't fix the problem
This commit is contained in:
parent
bf8d642607
commit
b7e71a249e
@ -551,8 +551,8 @@ char *glob_match_url(char *filename, URLGlob *glob)
|
|||||||
char *newstr;
|
char *newstr;
|
||||||
/* we append a single byte to allow for the trailing byte to be appended
|
/* we append a single byte to allow for the trailing byte to be appended
|
||||||
at the end of this function outside the while() loop */
|
at the end of this function outside the while() loop */
|
||||||
allocsize = (appendlen + stringlen)*2 + 1;
|
allocsize = (appendlen + stringlen)*2;
|
||||||
newstr=realloc(target, allocsize);
|
newstr=realloc(target, allocsize + 1);
|
||||||
if(NULL ==newstr) {
|
if(NULL ==newstr) {
|
||||||
free(target);
|
free(target);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user