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
13d95525
Commit
13d95525
authored
Jul 14, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Protect from null pointer in load().
parent
39562961
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
domdoc.c
dlls/msxml3/domdoc.c
+1
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+7
-0
No files found.
dlls/msxml3/domdoc.c
View file @
13d95525
...
@@ -2093,6 +2093,7 @@ static HRESULT WINAPI domdoc_load(
...
@@ -2093,6 +2093,7 @@ static HRESULT WINAPI domdoc_load(
}
}
break
;
break
;
case
VT_UNKNOWN
:
case
VT_UNKNOWN
:
if
(
!
V_UNKNOWN
(
&
source
))
return
E_INVALIDARG
;
hr
=
IUnknown_QueryInterface
(
V_UNKNOWN
(
&
source
),
&
IID_IXMLDOMDocument3
,
(
void
**
)
&
pNewDoc
);
hr
=
IUnknown_QueryInterface
(
V_UNKNOWN
(
&
source
),
&
IID_IXMLDOMDocument3
,
(
void
**
)
&
pNewDoc
);
if
(
hr
==
S_OK
)
if
(
hr
==
S_OK
)
{
{
...
...
dlls/msxml3/tests/domdoc.c
View file @
13d95525
...
@@ -10749,6 +10749,13 @@ static void test_load(void)
...
@@ -10749,6 +10749,13 @@ static void test_load(void)
doc
=
create_document
(
&
IID_IXMLDOMDocument
);
doc
=
create_document
(
&
IID_IXMLDOMDocument
);
/* null pointer as input */
V_VT
(
&
src
)
=
VT_UNKNOWN
;
V_UNKNOWN
(
&
src
)
=
NULL
;
hr
=
IXMLDOMDocument_load
(
doc
,
src
,
&
b
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
ok
(
b
==
VARIANT_FALSE
,
"got %d
\n
"
,
b
);
path
=
_bstr_
(
"test.xml"
);
path
=
_bstr_
(
"test.xml"
);
/* load from path: VT_BSTR */
/* load from path: VT_BSTR */
...
...
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