mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 02:34:23 -05:00
libobs-d3d11: Replace invocations of sprintf with snprintf
Fixes deprecation warnings in Xcode 14/clang on macOS and reduces chance of buffer overflows.
This commit is contained in:
@@ -330,7 +330,8 @@ void gs_device::InitCompiler()
|
||||
int ver = 49;
|
||||
|
||||
while (ver > 30) {
|
||||
sprintf(d3dcompiler, "D3DCompiler_%02d.dll", ver);
|
||||
snprintf(d3dcompiler, sizeof(d3dcompiler),
|
||||
"D3DCompiler_%02d.dll", ver);
|
||||
|
||||
HMODULE module = LoadLibraryA(d3dcompiler);
|
||||
if (module) {
|
||||
|
||||
Reference in New Issue
Block a user