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
1544be25
Commit
1544be25
authored
Apr 25, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Apr 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Fix URI leak in NewURI on failure.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
a10acc0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
nsio.c
dlls/mshtml/nsio.c
+13
-12
No files found.
dlls/mshtml/nsio.c
View file @
1544be25
...
...
@@ -3876,16 +3876,6 @@ static nsresult NSAPI nsIOServiceHook_NewURI(nsIIOServiceHook *iface, const nsAC
if
(
!
strncmp
(
spec
,
"wine:"
,
5
))
spec
+=
5
;
if
(
aBaseURI
)
{
nsres
=
nsIURI_QueryInterface
(
aBaseURI
,
&
IID_nsWineURI
,
(
void
**
)
&
base_wine_uri
);
if
(
NS_SUCCEEDED
(
nsres
))
{
if
(
!
ensure_uri
(
base_wine_uri
))
return
NS_ERROR_UNEXPECTED
;
}
else
{
WARN
(
"Could not get base nsWineURI: %08lx
\n
"
,
nsres
);
}
}
if
(
aOriginCharset
&&
*
aOriginCharset
&&
_strnicmp
(
aOriginCharset
,
"utf"
,
3
))
{
BSTR
charset
;
int
len
;
...
...
@@ -3903,8 +3893,21 @@ static nsresult NSAPI nsIOServiceHook_NewURI(nsIIOServiceHook *iface, const nsAC
MultiByteToWideChar
(
cp
,
0
,
spec
,
-
1
,
new_spec
,
ARRAY_SIZE
(
new_spec
));
if
(
aBaseURI
)
{
nsres
=
nsIURI_QueryInterface
(
aBaseURI
,
&
IID_nsWineURI
,
(
void
**
)
&
base_wine_uri
);
if
(
NS_SUCCEEDED
(
nsres
))
{
if
(
!
ensure_uri
(
base_wine_uri
))
{
nsIFileURL_Release
(
&
base_wine_uri
->
nsIFileURL_iface
);
return
NS_ERROR_UNEXPECTED
;
}
}
else
{
WARN
(
"Could not get base nsWineURI: %08lx
\n
"
,
nsres
);
}
}
if
(
base_wine_uri
)
{
hres
=
combine_url
(
base_wine_uri
->
uri
,
new_spec
,
&
urlmon_uri
);
nsIFileURL_Release
(
&
base_wine_uri
->
nsIFileURL_iface
);
}
else
{
hres
=
create_uri
(
new_spec
,
0
,
&
urlmon_uri
);
if
(
FAILED
(
hres
))
...
...
@@ -3916,8 +3919,6 @@ static nsresult NSAPI nsIOServiceHook_NewURI(nsIIOServiceHook *iface, const nsAC
nsres
=
create_nsuri
(
urlmon_uri
,
&
wine_uri
);
IUri_Release
(
urlmon_uri
);
if
(
base_wine_uri
)
nsIFileURL_Release
(
&
base_wine_uri
->
nsIFileURL_iface
);
if
(
NS_FAILED
(
nsres
))
return
nsres
;
...
...
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