diff options
author | ru <ru@FreeBSD.org> | 2006-01-15 19:17:13 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-01-15 19:17:13 +0000 |
commit | 938be08b698876af0eb98d21bb744bd6a084cca3 (patch) | |
tree | fa8cc473421940ef7e02436aa70bee8763b67891 /sbin/ifconfig/af_link.c | |
parent | ea56477c5e680f4f0bd1fcd7fdd70a674b03c34b (diff) | |
download | FreeBSD-src-938be08b698876af0eb98d21bb744bd6a084cca3.zip FreeBSD-src-938be08b698876af0eb98d21bb744bd6a084cca3.tar.gz |
Fix an off-by-one bug.
Submitted by: Ulrich Spoerlein
Diffstat (limited to 'sbin/ifconfig/af_link.c')
-rw-r--r-- | sbin/ifconfig/af_link.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ifconfig/af_link.c b/sbin/ifconfig/af_link.c index 57a1e27..d610750 100644 --- a/sbin/ifconfig/af_link.c +++ b/sbin/ifconfig/af_link.c @@ -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); |