Open devendranaga opened 5 years ago
this could result in a potential uninitalized memory access down the line.
https://github.com/cisco/joy/blob/47afb197763fea79138d7d92e07ba790cbb966b3/src/joy.c#L289
The code below ioctl is :
ioctl
sprintf((char*)mac_addr, "%02x%02x%02x%02x%02x%02x", (int)(unsigned char)ifr.ifr_hwaddr.sa_data[0], (int)(unsigned char)ifr.ifr_hwaddr.sa_data[1], (int)(unsigned char)ifr.ifr_hwaddr.sa_data[2], (int)(unsigned char)ifr.ifr_hwaddr.sa_data[3], (int)(unsigned char)ifr.ifr_hwaddr.sa_data[4], (int)(unsigned char)ifr.ifr_hwaddr.sa_data[5]);
And the get_mac_address OS specific code could be refactored into small functions as well.
get_mac_address
this could result in a potential uninitalized memory access down the line.
https://github.com/cisco/joy/blob/47afb197763fea79138d7d92e07ba790cbb966b3/src/joy.c#L289
The code below
ioctl
is :And the
get_mac_address
OS specific code could be refactored into small functions as well.