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
1ed0631e
Commit
1ed0631e
authored
Jan 27, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/reader: Handle NULL argument in GetNodeType().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5e59d093
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
reader.c
dlls/xmllite/reader.c
+4
-0
reader.c
dlls/xmllite/tests/reader.c
+7
-0
No files found.
dlls/xmllite/reader.c
View file @
1ed0631e
...
...
@@ -2786,8 +2786,12 @@ static HRESULT WINAPI xmlreader_Read(IXmlReader* iface, XmlNodeType *nodetype)
static
HRESULT
WINAPI
xmlreader_GetNodeType
(
IXmlReader
*
iface
,
XmlNodeType
*
node_type
)
{
xmlreader
*
This
=
impl_from_IXmlReader
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
node_type
);
if
(
!
node_type
)
return
E_INVALIDARG
;
*
node_type
=
reader_get_nodetype
(
This
);
return
This
->
state
==
XmlReadState_Closed
?
S_FALSE
:
S_OK
;
}
...
...
dlls/xmllite/tests/reader.c
View file @
1ed0631e
...
...
@@ -427,6 +427,13 @@ static void test_reader_create(void)
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
ok
(
nodetype
==
XmlNodeType_None
,
"got %d
\n
"
,
nodetype
);
/* crashes on XP, 2k3, works on newer versions */
if
(
0
)
{
hr
=
IXmlReader_GetNodeType
(
reader
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
}
resolver
=
(
void
*
)
0xdeadbeef
;
hr
=
IXmlReader_GetProperty
(
reader
,
XmlReaderProperty_XmlResolver
,
(
LONG_PTR
*
)
&
resolver
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
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