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
9b2968dc
Commit
9b2968dc
authored
Jul 19, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Jul 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Dynamically allocate argify buffer if the static one is too small.
parent
eeeca570
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
shlexec.c
dlls/shell32/shlexec.c
+13
-4
No files found.
dlls/shell32/shlexec.c
View file @
9b2968dc
...
...
@@ -781,7 +781,9 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
static
const
WCHAR
wTopic
[]
=
{
'\\'
,
't'
,
'o'
,
'p'
,
'i'
,
'c'
,
0
};
WCHAR
regkey
[
256
];
WCHAR
*
endkey
=
regkey
+
strlenW
(
key
);
WCHAR
app
[
256
],
topic
[
256
],
ifexec
[
256
],
res
[
256
];
WCHAR
app
[
256
],
topic
[
256
],
ifexec
[
256
],
static_res
[
256
];
WCHAR
*
dynamic_res
=
NULL
;
WCHAR
*
res
;
LONG
applen
,
topiclen
,
ifexeclen
;
WCHAR
*
exec
;
DWORD
ddeInst
=
0
;
...
...
@@ -896,9 +898,14 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
}
}
SHELL_ArgifyW
(
res
,
sizeof
(
res
)
/
sizeof
(
WCHAR
),
exec
,
lpFile
,
pidl
,
szCommandline
,
&
resultLen
);
if
(
resultLen
>
sizeof
(
res
)
/
sizeof
(
WCHAR
))
ERR
(
"Argify buffer not large enough, truncated
\n
"
);
SHELL_ArgifyW
(
static_res
,
sizeof
(
static_res
)
/
sizeof
(
WCHAR
),
exec
,
lpFile
,
pidl
,
szCommandline
,
&
resultLen
);
if
(
resultLen
>
sizeof
(
static_res
)
/
sizeof
(
WCHAR
))
{
res
=
dynamic_res
=
HeapAlloc
(
GetProcessHeap
(),
0
,
resultLen
*
sizeof
(
WCHAR
));
SHELL_ArgifyW
(
dynamic_res
,
resultLen
,
exec
,
lpFile
,
pidl
,
szCommandline
,
NULL
);
}
else
res
=
static_res
;
TRACE
(
"%s %s => %s
\n
"
,
debugstr_w
(
exec
),
debugstr_w
(
lpFile
),
debugstr_w
(
res
));
/* It's documented in the KB 330337 that IE has a bug and returns
...
...
@@ -922,6 +929,8 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
WARN
(
"DdeClientTransaction failed with error %04x
\n
"
,
DdeGetLastError
(
ddeInst
));
ret
=
33
;
HeapFree
(
GetProcessHeap
(),
0
,
dynamic_res
);
DdeDisconnect
(
hConv
);
error:
...
...
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