Fix malloc error
This commit is contained in:
parent
b6b98c9919
commit
cf7e5c470b
|
@ -65,6 +65,7 @@ char *quoteArgs(int argc, char **cmdline)
|
|||
len_total += len_read;
|
||||
if (len_allocated - len_total < 1024) {
|
||||
char *new_buf = malloc(len_allocated + 1024);
|
||||
len_allocated += 1024;
|
||||
if (new_buf == NULL)
|
||||
die("malloc failed");
|
||||
memcpy(new_buf, buf, len_total);
|
||||
|
|
Loading…
Reference in New Issue