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
4e559454
Commit
4e559454
authored
Sep 28, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Sep 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Handle long command line in execute_from_key().
parent
f1c57f06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
shlexec.c
dlls/shell32/shlexec.c
+8
-4
No files found.
dlls/shell32/shlexec.c
View file @
4e559454
...
...
@@ -965,7 +965,7 @@ static UINT_PTR execute_from_key(LPCWSTR key, LPCWSTR lpFile, WCHAR *env, LPCWST
SHELL_ExecuteW32
execfunc
,
LPSHELLEXECUTEINFOW
psei
,
LPSHELLEXECUTEINFOW
psei_out
)
{
WCHAR
cmd
[
256
],
param
[
1024
],
ddeexec
[
256
]
;
WCHAR
cmd
[
256
],
param
buffer
[
1024
],
ddeexec
[
256
],
*
param
=
parambuffer
;
LONG
cmdlen
=
sizeof
(
cmd
),
ddeexeclen
=
sizeof
(
ddeexec
);
UINT_PTR
retval
=
SE_ERR_NOASSOC
;
DWORD
resultLen
;
...
...
@@ -987,9 +987,12 @@ static UINT_PTR execute_from_key(LPCWSTR key, LPCWSTR lpFile, WCHAR *env, LPCWST
if
(
cmdlen
>=
ARRAY_SIZE
(
cmd
))
cmdlen
=
ARRAY_SIZE
(
cmd
)
-
1
;
cmd
[
cmdlen
]
=
'\0'
;
SHELL_ArgifyW
(
param
,
ARRAY_SIZE
(
param
),
cmd
,
lpFile
,
psei
->
lpIDList
,
szCommandline
,
&
resultLen
);
if
(
resultLen
>
ARRAY_SIZE
(
param
))
ERR
(
"Argify buffer not large enough, truncating
\n
"
);
SHELL_ArgifyW
(
param
,
ARRAY_SIZE
(
parambuffer
),
cmd
,
lpFile
,
psei
->
lpIDList
,
szCommandline
,
&
resultLen
);
if
(
resultLen
>
ARRAY_SIZE
(
parambuffer
))
{
if
((
param
=
malloc
(
resultLen
*
sizeof
(
*
param
))))
SHELL_ArgifyW
(
param
,
resultLen
,
cmd
,
lpFile
,
psei
->
lpIDList
,
szCommandline
,
&
resultLen
);
}
}
/* Get the parameters needed by the application
...
...
@@ -1012,6 +1015,7 @@ static UINT_PTR execute_from_key(LPCWSTR key, LPCWSTR lpFile, WCHAR *env, LPCWST
else
WARN
(
"Nothing appropriate found for %s
\n
"
,
debugstr_w
(
key
));
if
(
param
!=
parambuffer
)
free
(
param
);
return
retval
;
}
...
...
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