mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-12 13:24:26 +01:00
startup_checks: Resolve -Wstringop-truncation
Copies up to sizeof(p_name) - 1 in strncpy and null terminates it at p_name[254]
This commit is contained in:
parent
f86774c1ac
commit
bb31b0f261
@ -135,7 +135,8 @@ bool SpawnChild(const char* arg0, PROCESS_INFORMATION* pi, int flags) {
|
||||
startup_info.cb = sizeof(startup_info);
|
||||
|
||||
char p_name[255];
|
||||
std::strncpy(p_name, arg0, 255);
|
||||
std::strncpy(p_name, arg0, 254);
|
||||
p_name[254] = '\0';
|
||||
|
||||
const bool process_created = CreateProcessA(nullptr, // lpApplicationName
|
||||
p_name, // lpCommandLine
|
||||
|
Loading…
Reference in New Issue
Block a user