Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e783c358
Commit
e783c358
authored
Aug 23, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Handle S_FALSE from IUri methods when checking targetOrigin.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
196f13c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
htmlwindow.c
dlls/mshtml/htmlwindow.c
+15
-7
No files found.
dlls/mshtml/htmlwindow.c
View file @
e783c358
...
...
@@ -3181,24 +3181,32 @@ static HRESULT check_target_origin(HTMLInnerWindow *window, const WCHAR *target_
goto
done
;
}
bstr
=
NULL
;
hres
=
IUri_GetSchemeName
(
uri
,
&
bstr
);
if
(
FAILED
(
hres
))
if
(
hres
!=
S_OK
)
{
SysFreeString
(
bstr
);
goto
done
;
}
hres
=
IUri_GetSchemeName
(
target
,
&
bstr2
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
!
wcsicmp
(
bstr
,
bstr2
)
?
S_OK
:
S_FALSE
;
if
(
hres
==
S_OK
&&
wcsicmp
(
bstr
,
bstr2
))
hres
=
S_FALSE
;
SysFreeString
(
bstr2
);
}
SysFreeString
(
bstr
);
if
(
hres
!=
S_OK
)
goto
done
;
bstr
=
NULL
;
hres
=
IUri_GetHost
(
uri
,
&
bstr
);
if
(
FAILED
(
hres
))
if
(
hres
!=
S_OK
)
{
SysFreeString
(
bstr
);
goto
done
;
}
hres
=
IUri_GetHost
(
target
,
&
bstr2
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
!
wcsicmp
(
bstr
,
bstr2
)
?
S_OK
:
S_FALSE
;
if
(
hres
==
S_OK
&&
wcsicmp
(
bstr
,
bstr2
))
hres
=
S_FALSE
;
SysFreeString
(
bstr2
);
}
SysFreeString
(
bstr
);
...
...
@@ -3210,11 +3218,11 @@ static HRESULT check_target_origin(HTMLInnerWindow *window, const WCHAR *target_
goto
done
;
hres
=
IUri_GetPort
(
uri
,
&
port
);
if
(
FAILED
(
hres
)
)
if
(
hres
!=
S_OK
)
goto
done
;
hres
=
IUri_GetPort
(
target
,
&
port2
);
if
(
SUCCEEDED
(
hres
)
)
hres
=
(
port
==
port2
)
?
S_OK
:
S_FALSE
;
if
(
hres
==
S_OK
&&
port
!=
port2
)
hres
=
S_FALSE
;
done:
IUri_Release
(
target
);
...
...
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