Commit a027be08 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Instance: win32: Use the secure flavor of vsnprintf

parent 4db4f840
......@@ -254,7 +254,7 @@ public:
#else
//MSVC treats passing nullptr as 1st vsnprintf(_s) as an error
char psz_msg[512];
if ( vsnprintf(psz_msg, sizeof(psz_msg) - 1, format, va) < 0 )
if ( _vsnprintf_s( psz_msg, _TRUNCATE, format, va ) < 0 )
return;
char psz_ctx[1024];
sprintf_s(psz_ctx, "[%s] (%s:%d) %s", psz_module, psz_file, i_line, psz_msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment