Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
596921da
Commit
596921da
authored
24 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Make sure the cmdline passed to CreateProcessA is writeable (thanks to
Peter Ganten <peter@ganten.org>).
parent
b4905d22
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/process.h
+1
-1
1 addition, 1 deletion
include/process.h
loader/module.c
+6
-2
6 additions, 2 deletions
loader/module.c
scheduler/process.c
+3
-3
3 additions, 3 deletions
scheduler/process.c
with
10 additions
and
6 deletions
include/process.h
+
1
−
1
View file @
596921da
...
...
@@ -152,7 +152,7 @@ extern void PROCESS_InitWine( int argc, char *argv[] ) WINE_NORETURN;
extern
void
PROCESS_InitWinelib
(
int
argc
,
char
*
argv
[]
)
WINE_NORETURN
;
extern
PDB
*
PROCESS_IdToPDB
(
DWORD
id
);
extern
void
PROCESS_CallUserSignalProc
(
UINT
uCode
,
HMODULE
hModule
);
extern
BOOL
PROCESS_Create
(
HFILE
hFile
,
LPCSTR
filename
,
LP
C
STR
cmd_line
,
LPCSTR
env
,
extern
BOOL
PROCESS_Create
(
HFILE
hFile
,
LPCSTR
filename
,
LPSTR
cmd_line
,
LPCSTR
env
,
LPSECURITY_ATTRIBUTES
psa
,
LPSECURITY_ATTRIBUTES
tsa
,
BOOL
inherit
,
DWORD
flags
,
STARTUPINFOA
*
startup
,
PROCESS_INFORMATION
*
info
);
...
...
This diff is collapsed.
Click to expand it.
loader/module.c
+
6
−
2
View file @
596921da
...
...
@@ -723,13 +723,17 @@ HINSTANCE WINAPI WinExec( LPCSTR lpCmdLine, UINT nCmdShow )
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
HINSTANCE
hInstance
;
char
*
cmdline
;
memset
(
&
startup
,
0
,
sizeof
(
startup
)
);
startup
.
cb
=
sizeof
(
startup
);
startup
.
dwFlags
=
STARTF_USESHOWWINDOW
;
startup
.
wShowWindow
=
nCmdShow
;
if
(
CreateProcessA
(
NULL
,
(
LPSTR
)
lpCmdLine
,
NULL
,
NULL
,
FALSE
,
/* cmdline needs to be writeable for CreateProcess */
if
(
!
(
cmdline
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
lpCmdLine
)))
return
0
;
if
(
CreateProcessA
(
NULL
,
cmdline
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
startup
,
&
info
))
{
/* Give 30 seconds to the app to come up */
...
...
@@ -745,7 +749,7 @@ HINSTANCE WINAPI WinExec( LPCSTR lpCmdLine, UINT nCmdShow )
FIXME
(
"Strange error set by CreateProcess: %d
\n
"
,
hInstance
);
hInstance
=
11
;
}
HeapFree
(
GetProcessHeap
(),
0
,
cmdline
);
return
hInstance
;
}
...
...
This diff is collapsed.
Click to expand it.
scheduler/process.c
+
3
−
3
View file @
596921da
...
...
@@ -674,7 +674,7 @@ static void exec_wine_binary( char **argv, char **envp )
*
* Fork and exec a new Unix process, checking for errors.
*/
static
int
fork_and_exec
(
const
char
*
filename
,
const
char
*
cmdline
,
const
char
*
env
)
static
int
fork_and_exec
(
const
char
*
filename
,
char
*
cmdline
,
const
char
*
env
)
{
int
fd
[
2
];
int
pid
,
err
;
...
...
@@ -687,7 +687,7 @@ static int fork_and_exec( const char *filename, const char *cmdline, const char
fcntl
(
fd
[
1
],
F_SETFD
,
1
);
/* set close on exec */
if
(
!
(
pid
=
fork
()))
/* child */
{
char
**
argv
=
build_argv
(
(
char
*
)
cmdline
,
filename
?
0
:
2
);
char
**
argv
=
build_argv
(
cmdline
,
filename
?
0
:
2
);
char
**
envp
=
build_envp
(
env
);
close
(
fd
[
0
]
);
if
(
argv
&&
envp
)
...
...
@@ -722,7 +722,7 @@ static int fork_and_exec( const char *filename, const char *cmdline, const char
* file, and we exec a new copy of wine to load it; otherwise we
* simply exec the specified filename as a Unix process.
*/
BOOL
PROCESS_Create
(
HFILE
hFile
,
LPCSTR
filename
,
LP
C
STR
cmd_line
,
LPCSTR
env
,
BOOL
PROCESS_Create
(
HFILE
hFile
,
LPCSTR
filename
,
LPSTR
cmd_line
,
LPCSTR
env
,
LPSECURITY_ATTRIBUTES
psa
,
LPSECURITY_ATTRIBUTES
tsa
,
BOOL
inherit
,
DWORD
flags
,
LPSTARTUPINFOA
startup
,
LPPROCESS_INFORMATION
info
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment