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
7c7a5946
Commit
7c7a5946
authored
Aug 18, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Fixed handling NULL argument in IHTMLElement::contains implementation.
parent
d5d72870
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
htmlelem.c
dlls/mshtml/htmlelem.c
+12
-12
dom.c
dlls/mshtml/tests/dom.c
+1
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
7c7a5946
...
@@ -882,22 +882,22 @@ static HRESULT WINAPI HTMLElement_contains(IHTMLElement *iface, IHTMLElement *pC
...
@@ -882,22 +882,22 @@ static HRESULT WINAPI HTMLElement_contains(IHTMLElement *iface, IHTMLElement *pC
VARIANT_BOOL
*
pfResult
)
VARIANT_BOOL
*
pfResult
)
{
{
HTMLElement
*
This
=
impl_from_IHTMLElement
(
iface
);
HTMLElement
*
This
=
impl_from_IHTMLElement
(
iface
);
HTMLElement
*
child
;
cpp_bool
result
=
FALSE
;
cpp_bool
result
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
pChild
,
pfResult
);
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
pChild
,
pfResult
);
child
=
unsafe_impl_from_IHTMLElement
(
pChild
);
if
(
pChild
)
{
if
(
!
child
)
{
HTMLElement
*
child
;
ERR
(
"not our element
\n
"
);
nsresult
nsres
;
return
E_FAIL
;
}
nsres
=
nsIDOMNode_Contains
(
This
->
node
.
nsnode
,
child
->
node
.
nsnode
,
&
result
);
child
=
unsafe_impl_from_IHTMLElement
(
pChild
);
if
(
NS_FAILED
(
nsres
))
{
if
(
!
child
)
{
ERR
(
"failed
\n
"
);
ERR
(
"not our element
\n
"
);
return
E_FAIL
;
return
E_FAIL
;
}
nsres
=
nsIDOMNode_Contains
(
This
->
node
.
nsnode
,
child
->
node
.
nsnode
,
&
result
);
assert
(
nsres
==
NS_OK
);
}
}
*
pfResult
=
result
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
pfResult
=
result
?
VARIANT_TRUE
:
VARIANT_FALSE
;
...
...
dlls/mshtml/tests/dom.c
View file @
7c7a5946
...
@@ -6913,6 +6913,7 @@ static void test_elems(IHTMLDocument2 *doc)
...
@@ -6913,6 +6913,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_elem_contains
(
elem
,
elem3
,
VARIANT_FALSE
);
test_elem_contains
(
elem
,
elem3
,
VARIANT_FALSE
);
test_elem_contains
(
elem
,
elem2
,
VARIANT_FALSE
);
test_elem_contains
(
elem
,
elem2
,
VARIANT_FALSE
);
test_elem_contains
(
elem
,
elem
,
VARIANT_TRUE
);
test_elem_contains
(
elem
,
elem
,
VARIANT_TRUE
);
test_elem_contains
(
elem
,
NULL
,
VARIANT_FALSE
);
IHTMLElement_Release
(
elem2
);
IHTMLElement_Release
(
elem2
);
elem2
=
test_elem_get_parent
((
IUnknown
*
)
elem3
);
elem2
=
test_elem_get_parent
((
IUnknown
*
)
elem3
);
...
...
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