fix memory leak and out-of-range writes
This commit is contained in:
parent
e77cc389d5
commit
854bd47cb8
1 changed files with 1 additions and 0 deletions
|
@ -72,6 +72,7 @@ merge (char **dest, char **ps)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dest = p;
|
||||||
for (j = 0; ps[j]; j++)
|
for (j = 0; ps[j]; j++)
|
||||||
dest[i++] = ps[j];
|
dest[i++] = ps[j];
|
||||||
dest[i] = 0;
|
dest[i] = 0;
|
||||||
|
|
Loading…
Reference in a new issue