Closed jwbensley closed 7 years ago
Email from Bruno:
In the file functions.cpp, function get_interface_mtu_by_name(), the lines :
const uint8_t *pIF_NAME = TEST_INTERFACE->IF_NAME; strcpy(ifr.ifr_name,(char*) pIF_NAME);
should be replaced by
strncpy(ifr.ifr_name, (char *) TEST_INTERFACE->IF_NAME, sizeof(ifr.ifr_name));
as TEST_INTERFACE->IF_NAME is not guaranteed to be zero-terminated.
This is in relation to https://github.com/jwbensley/Etherate/blob/master/functions.cpp#L924
Fixed in beta 0.12.
Email from Bruno:
strncpy(ifr.ifr_name, (char *) TEST_INTERFACE->IF_NAME, sizeof(ifr.ifr_name));
This is in relation to https://github.com/jwbensley/Etherate/blob/master/functions.cpp#L924