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
08ab605e
Commit
08ab605e
authored
Nov 16, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Nov 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Dynamically allocate memory for executing an URL.
parent
9d055348
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
shlexec.c
dlls/shell32/shlexec.c
+13
-3
No files found.
dlls/shell32/shlexec.c
View file @
08ab605e
...
...
@@ -1407,9 +1407,11 @@ static UINT_PTR SHELL_execute_url( LPCWSTR lpFile, LPCWSTR wFile, LPCWSTR wcmd,
{
static
const
WCHAR
wShell
[]
=
{
'\\'
,
's'
,
'h'
,
'e'
,
'l'
,
'l'
,
'\\'
,
0
};
static
const
WCHAR
wCommand
[]
=
{
'\\'
,
'c'
,
'o'
,
'm'
,
'm'
,
'a'
,
'n'
,
'd'
,
0
};
WCHAR
lpstrProtocol
[
256
];
UINT_PTR
retval
;
WCHAR
*
lpstrProtocol
;
LPCWSTR
lpstrRes
;
INT
iSize
;
DWORD
len
;
lpstrRes
=
strchrW
(
lpFile
,
':'
);
if
(
lpstrRes
)
...
...
@@ -1419,6 +1421,12 @@ static UINT_PTR SHELL_execute_url( LPCWSTR lpFile, LPCWSTR wFile, LPCWSTR wcmd,
TRACE
(
"Got URL: %s
\n
"
,
debugstr_w
(
lpFile
));
/* Looking for ...protocol\shell\lpOperation\command */
len
=
iSize
+
lstrlenW
(
wShell
)
+
lstrlenW
(
wCommand
)
+
1
;
if
(
psei
->
lpVerb
)
len
+=
lstrlenW
(
psei
->
lpVerb
);
else
len
+=
lstrlenW
(
wszOpen
);
lpstrProtocol
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
memcpy
(
lpstrProtocol
,
lpFile
,
iSize
*
sizeof
(
WCHAR
));
lpstrProtocol
[
iSize
]
=
'\0'
;
strcatW
(
lpstrProtocol
,
wShell
);
...
...
@@ -1432,8 +1440,10 @@ static UINT_PTR SHELL_execute_url( LPCWSTR lpFile, LPCWSTR wFile, LPCWSTR wcmd,
lpFile
+=
iSize
;
while
(
*
lpFile
==
':'
)
lpFile
++
;
}
return
execute_from_key
(
lpstrProtocol
,
lpFile
,
NULL
,
psei
->
lpParameters
,
wcmd
,
execfunc
,
psei
,
psei_out
);
retval
=
execute_from_key
(
lpstrProtocol
,
lpFile
,
NULL
,
psei
->
lpParameters
,
wcmd
,
execfunc
,
psei
,
psei_out
);
HeapFree
(
GetProcessHeap
(),
0
,
lpstrProtocol
);
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