Fix an off-by-one bug.

Submitted by:	Ulrich Spoerlein
This commit is contained in:
Ruslan Ermilov 2006-01-15 19:17:13 +00:00
parent d248c7d7f5
commit 5fb6ae1091
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154401

View File

@ -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);