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
414ff43b
Commit
414ff43b
authored
May 18, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
May 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Unescape path in place in MkProtocol::StartEx.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
441347f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
mk.c
dlls/urlmon/mk.c
+10
-13
No files found.
dlls/urlmon/mk.c
View file @
414ff43b
...
@@ -203,9 +203,8 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
...
@@ -203,9 +203,8 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
{
{
MkProtocol
*
This
=
impl_from_IInternetProtocolEx
(
iface
);
MkProtocol
*
This
=
impl_from_IInternetProtocolEx
(
iface
);
LPWSTR
mime
,
progid
,
display_name
,
colon_ptr
;
LPWSTR
mime
,
progid
,
display_name
,
colon_ptr
;
DWORD
path_size
=
INTERNET_MAX_URL_LENGTH
;
DWORD
bindf
=
0
,
eaten
=
0
,
scheme
=
0
,
len
;
DWORD
bindf
=
0
,
eaten
=
0
,
scheme
=
0
,
len
;
BSTR
url
,
path
_tmp
,
path
=
NULL
;
BSTR
url
,
path
=
NULL
;
IParseDisplayName
*
pdn
;
IParseDisplayName
*
pdn
;
BINDINFO
bindinfo
;
BINDINFO
bindinfo
;
STATSTG
statstg
;
STATSTG
statstg
;
...
@@ -244,22 +243,20 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
...
@@ -244,22 +243,20 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
CoTaskMemFree
(
mime
);
CoTaskMemFree
(
mime
);
}
}
hres
=
IUri_GetPath
(
pUri
,
&
path
_tmp
);
hres
=
IUri_GetPath
(
pUri
,
&
path
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
path
=
heap_alloc
(
path_size
);
len
=
SysStringLen
(
path
)
+
1
;
hres
=
UrlUnescapeW
((
LPWSTR
)
path_tmp
,
path
,
&
path_size
,
0
);
hres
=
UrlUnescapeW
(
path
,
NULL
,
&
len
,
URL_UNESCAPE_INPLACE
);
SysFreeString
(
path_tmp
);
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
SysFreeString
(
path
);
{
heap_free
(
path
);
return
report_result
(
pOIProtSink
,
INET_E_RESOURCE_NOT_FOUND
,
ERROR_INVALID_PARAMETER
);
return
report_result
(
pOIProtSink
,
INET_E_RESOURCE_NOT_FOUND
,
ERROR_INVALID_PARAMETER
);
}
}
progid
=
path
+
1
;
/* skip '@' symbol */
progid
=
path
+
1
;
/* skip '@' symbol */
colon_ptr
=
strchrW
(
path
,
':'
);
colon_ptr
=
strchrW
(
path
,
':'
);
if
(
!
colon_ptr
)
if
(
!
colon_ptr
)
{
{
SysFreeString
(
path
);
heap_free
(
path
);
return
report_result
(
pOIProtSink
,
INET_E_RESOURCE_NOT_FOUND
,
ERROR_INVALID_PARAMETER
);
return
report_result
(
pOIProtSink
,
INET_E_RESOURCE_NOT_FOUND
,
ERROR_INVALID_PARAMETER
);
}
}
...
@@ -269,7 +266,7 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
...
@@ -269,7 +266,7 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
progid
[
colon_ptr
-
progid
]
=
0
;
/* overwrite ':' with NULL terminator */
progid
[
colon_ptr
-
progid
]
=
0
;
/* overwrite ':' with NULL terminator */
hres
=
CLSIDFromProgID
(
progid
,
&
clsid
);
hres
=
CLSIDFromProgID
(
progid
,
&
clsid
);
heap_free
(
path
);
SysFreeString
(
path
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
{
{
heap_free
(
display_name
);
heap_free
(
display_name
);
...
...
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