https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0609db55d7b3414e08002d8b3e396bff13a6fcde
commit 0609db55d7b3414e08002d8b3e396bff13a6fcde Author: Doug Lyons <[email protected]> AuthorDate: Thu Nov 25 14:06:05 2021 -0600 Commit: GitHub <[email protected]> CommitDate: Thu Nov 25 21:06:05 2021 +0100 [NTVDM] Use strsafe functions for concantenation of strings in otvdm code. (#4124) --- subsystems/mvdm/ntvdm/dos/dos32krnl/process.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c b/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c index 492467656c0..aa5680dc237 100644 --- a/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c +++ b/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c @@ -13,6 +13,7 @@ #define NDEBUG #include <debug.h> +#include <strsafe.h> #include "emulator.h" #include "cpu/cpu.h" @@ -803,9 +804,9 @@ WORD DosCreateProcess(IN LPCSTR ProgramName, CHAR ExpName[MAX_PATH]; ExpandEnvironmentStringsA(AppName, ExpName, ARRAYSIZE(ExpName) - 1); - strcat(ExpName, "\""); // Add double-quote before ProgramName - strcat(ExpName, ProgramName); // Append Program name - strcat(ExpName, "\""); // Add double-quote after ProgramName + StringCbCatA(ExpName, sizeof(ExpName), "\""); // Add double-quote before ProgramName + StringCbCatA(ExpName, sizeof(ExpName), ProgramName); // Append Program name + StringCbCatA(ExpName, sizeof(ExpName), "\""); // Add double-quote after ProgramName ZeroMemory(&pi, sizeof(pi)); ZeroMemory(&si, sizeof(si));
