mirror of https://github.com/decompals/wibo.git
Fix a use-after-free in CreateProcessA (#54)
Co-authored-by: Simon Lindholm <simon.lindholm10@gmail.com>
This commit is contained in:
parent
90101d8bc1
commit
a829d0d58b
|
@ -214,7 +214,8 @@ namespace kernel32 {
|
||||||
|
|
||||||
char **argv = (char **) calloc(argc + 1, sizeof(char*));
|
char **argv = (char **) calloc(argc + 1, sizeof(char*));
|
||||||
argv[0] = wibo::executableName;
|
argv[0] = wibo::executableName;
|
||||||
argv[1] = (char *) files::pathFromWindows(lpApplicationName).string().c_str();
|
std::string pathStr = files::pathFromWindows(lpApplicationName).string();
|
||||||
|
argv[1] = (char *) pathStr.c_str();
|
||||||
|
|
||||||
char* arg = strtok(lpCommandLine, " ");
|
char* arg = strtok(lpCommandLine, " ");
|
||||||
size_t current_arg_index = 2;
|
size_t current_arg_index = 2;
|
||||||
|
|
Loading…
Reference in New Issue