Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
596921da
Commit
596921da
authored
Jun 24, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure the cmdline passed to CreateProcessA is writeable (thanks to
Peter Ganten <peter@ganten.org>).
parent
b4905d22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
process.h
include/process.h
+1
-1
module.c
loader/module.c
+6
-2
process.c
scheduler/process.c
+3
-3
No files found.
include/process.h
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
);
...
...
loader/module.c
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
;
}
...
...
scheduler/process.c
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
,
c
onst
c
har
*
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment