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
8952dea4
Commit
8952dea4
authored
25 years ago
by
Andreas Mohr
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed cmd line length calculation.
parent
3ba4be40
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
loader/module.c
+18
-18
18 additions, 18 deletions
loader/module.c
with
18 additions
and
18 deletions
loader/module.c
+
18
−
18
View file @
8952dea4
...
...
@@ -499,10 +499,10 @@ WINE_MODREF *MODULE_FindModule(
* Returns FALSE if the file is not an executable or if the function fails.
*
* To do so it opens the file and reads in the header information
* if the extended header information is not presen
d
it will
* assume that
that
the file is a DOS executable.
* if the extended header information is not presen
t
it will
* assume that the file is a DOS executable.
* If the extended header information is present it will
* determine if the file is a
n
16 or 32 bit Windows executable
* determine if the file is a 16 or 32 bit Windows executable
* by check the flags in the header.
*
* Note that .COM and .PIF files are only recognized by their
...
...
@@ -1050,7 +1050,6 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
char
name
[
256
],
dummy
[
256
];
LPCSTR
cmdline
=
NULL
;
LPSTR
tidy_cmdline
;
int
len
=
0
;
/* Get name and command line */
...
...
@@ -1064,19 +1063,18 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
name
[
0
]
=
'\0'
;
if
(
lpApplicationName
)
{
found_file
=
make_lpApplicationName_name
(
lpApplicationName
,
name
,
sizeof
(
name
)
);
if
(
lpCommandLine
)
{
make_lpCommandLine_name
(
lpCommandLine
,
dummy
,
sizeof
(
dummy
),
&
cmdline
);
}
else
{
cmdline
=
lpApplicationName
;
}
len
+=
strlen
(
lpApplicationName
);
if
(
lpApplicationName
)
{
found_file
=
make_lpApplicationName_name
(
lpApplicationName
,
name
,
sizeof
(
name
)
);
if
(
lpCommandLine
)
make_lpCommandLine_name
(
lpCommandLine
,
dummy
,
sizeof
(
dummy
),
&
cmdline
);
else
cmdline
=
lpApplicationName
;
}
else
{
found_file
=
make_lpCommandLine_name
(
lpCommandLine
,
name
,
sizeof
(
name
),
&
cmdline
);
if
(
lpCommandLine
)
len
=
strlen
(
lpCommandLine
);
else
{
if
(
lpCommandLine
)
found_file
=
make_lpCommandLine_name
(
lpCommandLine
,
name
,
sizeof
(
name
),
&
cmdline
);
}
if
(
!
found_file
)
{
...
...
@@ -1085,8 +1083,10 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
return
FALSE
;
}
len
+=
strlen
(
name
)
+
2
;
tidy_cmdline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
!
cmdline
)
cmdline
=
""
;
tidy_cmdline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
name
)
+
strlen
(
cmdline
)
+
3
);
TRACE_
(
module
)(
"tidy_cmdline: name '%s'[%d], cmdline '%s'[%d]
\n
"
,
name
,
strlen
(
name
),
cmdline
,
strlen
(
cmdline
));
sprintf
(
tidy_cmdline
,
"
\"
%s
\"
%s"
,
name
,
cmdline
);
/* Warn if unsupported features are used */
...
...
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