Fix an off-by-one error.

Reviewed by:	sam
This commit is contained in:
Maxim Konovalov 2006-01-29 17:32:39 +00:00
parent c8c4c87d6a
commit 8a4fabbd23
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155009

View File

@ -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) + 1);
temp = malloc(strlen(val) + 2);
if (temp == NULL)
errx(1, "malloc failed");
temp[0] = ':';