Bugfix/win32 build warnings (#936)
* Changed win32 port of localtime to use secure OS API functions when compiled with MSVC * Changed all the sprintf to use snprintf instead in BSC tests to ensure null string endings.
This commit is contained in:
@@ -466,7 +466,8 @@ static char *ifname_default(void)
|
||||
if (BIP_Interface_Name[0] != 0) {
|
||||
return BIP_Interface_Name;
|
||||
}
|
||||
strncpy(BIP_Interface_Name, "en0", sizeof(BIP_Interface_Name));
|
||||
snprintf(BIP_Interface_Name, sizeof(BIP_Interface_Name), "%s", "en0");
|
||||
|
||||
return BIP_Interface_Name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user