mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00:00
Fix an off-by-one bug.
Submitted by: Ulrich Spoerlein
This commit is contained in:
parent
d248c7d7f5
commit
5fb6ae1091
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154401
@ -79,7 +79,7 @@ link_getaddr(const char *addr, int which)
|
||||
|
||||
if (which != ADDR)
|
||||
errx(1, "can't set link-level netmask or broadcast");
|
||||
if ((temp = malloc(strlen(addr) + 1)) == NULL)
|
||||
if ((temp = malloc(strlen(addr) + 2)) == NULL)
|
||||
errx(1, "malloc failed");
|
||||
temp[0] = ':';
|
||||
strcpy(temp + 1, addr);
|
||||
|
Loading…
Reference in New Issue
Block a user