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
d1e14576
Commit
d1e14576
authored
Apr 11, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/reader: Fix IID argument handling in CreateXmlReader().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d5d86359
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
reader.c
dlls/xmllite/reader.c
+5
-9
reader.c
dlls/xmllite/tests/reader.c
+17
-2
No files found.
dlls/xmllite/reader.c
View file @
d1e14576
...
...
@@ -3603,16 +3603,11 @@ static const struct IUnknownVtbl xmlreaderinputvtbl =
HRESULT
WINAPI
CreateXmlReader
(
REFIID
riid
,
void
**
obj
,
IMalloc
*
imalloc
)
{
xmlreader
*
reader
;
HRESULT
hr
;
int
i
;
TRACE
(
"(%s, %p, %p)
\n
"
,
wine_dbgstr_guid
(
riid
),
obj
,
imalloc
);
if
(
!
IsEqualGUID
(
riid
,
&
IID_IXmlReader
))
{
ERR
(
"Unexpected IID requested -> (%s)
\n
"
,
wine_dbgstr_guid
(
riid
));
return
E_FAIL
;
}
if
(
imalloc
)
reader
=
IMalloc_Alloc
(
imalloc
,
sizeof
(
*
reader
));
else
...
...
@@ -3640,11 +3635,12 @@ HRESULT WINAPI CreateXmlReader(REFIID riid, void **obj, IMalloc *imalloc)
for
(
i
=
0
;
i
<
StringValue_Last
;
i
++
)
reader
->
strvalues
[
i
]
=
strval_empty
;
*
obj
=
&
reader
->
IXmlReader_iface
;
hr
=
IXmlReader_QueryInterface
(
&
reader
->
IXmlReader_iface
,
riid
,
obj
);
IXmlReader_Release
(
&
reader
->
IXmlReader_iface
);
TRACE
(
"returning iface %p
\n
"
,
*
obj
);
TRACE
(
"returning iface %p
, hr %#x
\n
"
,
*
obj
,
hr
);
return
S_OK
;
return
hr
;
}
HRESULT
WINAPI
CreateXmlReaderInputWithEncodingName
(
IUnknown
*
stream
,
...
...
dlls/xmllite/tests/reader.c
View file @
d1e14576
...
...
@@ -536,11 +536,11 @@ static IXmlResolver testresolver = { &resolvervtbl };
static
void
test_reader_create
(
void
)
{
IXmlResolver
*
resolver
;
HRESULT
hr
;
IUnknown
*
input
,
*
unk
;
IXmlReader
*
reader
;
IUnknown
*
input
;
DtdProcessing
dtd
;
XmlNodeType
nodetype
;
HRESULT
hr
;
/* crashes native */
if
(
0
)
...
...
@@ -549,6 +549,21 @@ static void test_reader_create(void)
CreateXmlReader
(
NULL
,
(
void
**
)
&
reader
,
NULL
);
}
hr
=
CreateXmlReader
(
&
IID_IStream
,
(
void
**
)
&
unk
,
NULL
);
ok
(
hr
==
E_NOINTERFACE
,
"got %08x
\n
"
,
hr
);
hr
=
CreateXmlReader
(
&
IID_IUnknown
,
(
void
**
)
&
unk
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_IXmlReader
,
(
void
**
)
&
reader
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
unk
==
(
IUnknown
*
)
reader
,
"unexpected interface
\n
"
);
IXmlReader_Release
(
reader
);
IUnknown_Release
(
unk
);
hr
=
CreateXmlReader
(
&
IID_IUnknown
,
(
void
**
)
&
reader
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
IXmlReader_Release
(
reader
);
hr
=
CreateXmlReader
(
&
IID_IXmlReader
,
(
void
**
)
&
reader
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %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