mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-18 18:56:24 +00:00
Merge pull request #1354 from contrun/fix-sprintf-overflow
fix sprintf overflow
This commit is contained in:
commit
88a1170966
2
one.cpp
2
one.cpp
@ -1333,7 +1333,7 @@ static int cli(int argc,char **argv)
|
||||
if (ioctl(sock, SIOCGIFHWADDR, &ifr) == 0) {
|
||||
unsigned char mac_addr[6];
|
||||
memcpy(mac_addr, ifr.ifr_hwaddr.sa_data, 6);
|
||||
char macStr[16];
|
||||
char macStr[18];
|
||||
sprintf(macStr, "%02x:%02x:%02x:%02x:%02x:%02x",
|
||||
mac_addr[0],
|
||||
mac_addr[1],
|
||||
|
Loading…
Reference in New Issue
Block a user