Off by one error in malloc.
Approved by: re@
This commit is contained in:
parent
988d4dc315
commit
dbed417dab
@ -238,7 +238,7 @@ set(char *t, NODE *ip)
|
||||
lineno, val);
|
||||
break;
|
||||
case F_SLINK:
|
||||
ip->slink = malloc(strlen(val));
|
||||
ip->slink = malloc(strlen(val) + 1);
|
||||
if (ip->slink == NULL)
|
||||
errx(1, "malloc");
|
||||
if (strunvis(ip->slink, val) == -1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user