relative.c: fix potential heap buffer overflow
This commit is contained in:
parent
b78cc75d12
commit
03302d4963
@ -141,7 +141,7 @@ main(int ac, char *av[])
|
||||
if (!*what_p && !*to_p)
|
||||
result(base_name(orig_what));
|
||||
|
||||
res = xmalloc(strlen(what) + strlen(to) * 3 / 2 + 3);
|
||||
res = xmalloc(strlen(orig_what) + strlen(to) * 3 / 2 + 3);
|
||||
|
||||
if (('/' == *what_p) && !*to_p)
|
||||
result(orig_what + (++what_p - what));
|
||||
|
Loading…
Reference in New Issue
Block a user