summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2006-02-14 23:19:40 +0000
committerSam Leffler <sam@FreeBSD.org>2006-02-14 23:19:40 +0000
commit225b126b2d09570c685ae0cf09aa1c6f1d20fc82 (patch)
tree9191d91821d089794555d86acde9befd4d7ca53f /sbin
parent97bcffbd74d7d40d0abbdf6989b4e9c4fdcc435c (diff)
Notes
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifieee80211.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index 5b4e2d5cc3532..77bc6a7e3ed4d 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -475,7 +475,7 @@ set80211bssid(const char *val, int d, int s, const struct afswtch *rafp)
char *temp;
struct sockaddr_dl sdl;
- temp = malloc(strlen(val) + 2);
+ temp = malloc(strlen(val) + 2); /* ':' and '\0' */
if (temp == NULL)
errx(1, "malloc failed");
temp[0] = ':';
@@ -601,7 +601,7 @@ set80211macmac(int s, int op, const char *val)
char *temp;
struct sockaddr_dl sdl;
- temp = malloc(strlen(val) + 1);
+ temp = malloc(strlen(val) + 2); /* ':' and '\0' */
if (temp == NULL)
errx(1, "malloc failed");
temp[0] = ':';
@@ -633,7 +633,7 @@ DECL_CMD_FUNC(set80211kickmac, val, d)
struct sockaddr_dl sdl;
struct ieee80211req_mlme mlme;
- temp = malloc(strlen(val) + 1);
+ temp = malloc(strlen(val) + 2); /* ':' and '\0' */
if (temp == NULL)
errx(1, "malloc failed");
temp[0] = ':';