Silence the last two C4996 warnings in our code
hook_registry.cpp still used strncpy for the hook-name copy (the same class the log-ring fix addressed) -- replace with a bounded memcpy. coop_vk_layer.cpp's debug logger used _wfopen -- switch to _wfopen_s. Both were the only remaining C4996s in our own code.
This commit is contained in:
@@ -151,8 +151,8 @@ void logvk(const char* fmt, ...)
|
||||
if (GetTempPathW(MAX_PATH, dir) == 0) {
|
||||
return;
|
||||
}
|
||||
FILE* f = _wfopen((std::wstring(dir) + L"coop_vk_layer.log").c_str(), L"a");
|
||||
if (f == nullptr) {
|
||||
FILE* f = nullptr;
|
||||
if (_wfopen_s(&f, (std::wstring(dir) + L"coop_vk_layer.log").c_str(), L"a") != 0 || f == nullptr) {
|
||||
return;
|
||||
}
|
||||
va_list ap;
|
||||
|
||||
Reference in New Issue
Block a user