mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-21 07:45:07 +00:00
Fix an off-by-one error.
Reviewed by: sam
This commit is contained in:
parent
c8c4c87d6a
commit
8a4fabbd23
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155009
|
@ -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] = ':';
|
||||
|
|
Loading…
Reference in a new issue