mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-26 22:01:39 +00:00
Fix possible out-of-bounds array access if an empty command-line argument is passed to ProcessUtils::runElevated() on Windows
This commit is contained in:
parent
61e7561615
commit
3a7b636f42
1 changed files with 1 additions and 1 deletions
|
@ -280,7 +280,7 @@ void ProcessUtils::runElevatedWindows(const std::string& executable,
|
|||
{
|
||||
std::string arg = *iter;
|
||||
|
||||
if (arg.at(0) != '"' && arg.at(arg.size()-1) != '"')
|
||||
if (!arg.empty() && arg.at(0) != '"' && arg.at(arg.size()-1) != '"')
|
||||
{
|
||||
arg.insert(0,"\"");
|
||||
arg.append("\"");
|
||||
|
|
Loading…
Reference in a new issue