Files
codeql/cpp/ql/src/Security/CWE/CWE-428/UnsafeCreateProcessCall.cpp
Raul Garcia 85283d63ce C++ : NULL application name with an unquoted path in call to CreateProcess
Calling a function of the CreatePorcess* family of functions, which may result in a security vulnerability if the path contains spaces.
2018-10-12 15:57:01 -07:00

11 lines
278 B
C++

STARTUPINFOW si;
PROCESS_INFORMATION pi;
// ...
CreateProcessW( // BUG
NULL, // lpApplicationName
(LPWSTR)L"C:\\Program Files\\MyApp", // lpCommandLine
NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
// ...