Skip to content

Commit

Permalink
Fix argument quoting
Browse files Browse the repository at this point in the history
  • Loading branch information
mturk committed Dec 2, 2022
1 parent adb099b commit a7c7e1d
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions svcbatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -2056,17 +2056,9 @@ static unsigned int __stdcall workerthread(void *unused)

cmdline = xappendarg(1, NULL, comspec);
cmdline = xappendarg(0, cmdline, L"/D /C");
if (svcbatchargs != NULL) {
wchar_t *b = xappendarg(1, NULL, svcbatchfile);
cmdline = xwcsappend(cmdline, L" \"");
cmdline = xwcsappend(cmdline, b);
cmdline = xappendarg(0, cmdline, svcbatchargs);
cmdline = xwcsappend(cmdline, L"\"");
xfree(b);
}
else {
cmdline = xappendarg(1, cmdline, svcbatchfile);
}
cmdline = xappendarg(1, cmdline, svcbatchfile);
cmdline = xappendarg(0, cmdline, svcbatchargs);

dbgprintf(__FUNCTION__, "cmdline %S", cmdline);
memset(&ji, 0, sizeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION));
memset(&cp, 0, sizeof(PROCESS_INFORMATION));
Expand Down

0 comments on commit a7c7e1d

Please sign in to comment.