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:
BlackMark committed 2026-07-12 12:04:28 +02:00
1 parent ce996763d5
commit b2b8abdc51
2 files changed
+6 -4

No files matched your search

+2 -2
View File
@@ -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;