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
ba4fcecf
Commit
ba4fcecf
authored
Mar 24, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/mxwriter: Simplify argument check in externalEntityDecl().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
62bd6567
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
mxwriter.c
dlls/msxml3/mxwriter.c
+1
-3
saxreader.c
dlls/msxml3/tests/saxreader.c
+12
-1
No files found.
dlls/msxml3/mxwriter.c
View file @
ba4fcecf
...
...
@@ -1679,9 +1679,7 @@ static HRESULT WINAPI SAXDeclHandler_externalEntityDecl(ISAXDeclHandler *iface,
TRACE
(
"(%p)->(%s:%d %s:%d %s:%d)
\n
"
,
This
,
debugstr_wn
(
name
,
n_name
),
n_name
,
debugstr_wn
(
publicId
,
n_publicId
),
n_publicId
,
debugstr_wn
(
systemId
,
n_systemId
),
n_systemId
);
if
(
!
name
)
return
E_INVALIDARG
;
if
(
publicId
&&
!
systemId
)
return
E_INVALIDARG
;
if
(
!
publicId
&&
!
systemId
)
return
E_INVALIDARG
;
if
(
!
name
||
!
systemId
)
return
E_INVALIDARG
;
write_output_buffer
(
This
,
entityW
,
sizeof
(
entityW
)
/
sizeof
(
WCHAR
));
if
(
n_name
)
{
...
...
dlls/msxml3/tests/saxreader.c
View file @
ba4fcecf
...
...
@@ -4996,11 +4996,22 @@ static void test_mxwriter_dtd(void)
_bstr_
(
"sysid"
),
strlen
(
"sysid"
));
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ISAXDeclHandler_externalEntityDecl
(
decl
,
_bstr_
(
"name"
),
strlen
(
"name"
),
NULL
,
0
,
_bstr_
(
"sysid"
),
strlen
(
"sysid"
));
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ISAXDeclHandler_externalEntityDecl
(
decl
,
_bstr_
(
"name"
),
strlen
(
"name"
),
_bstr_
(
"pubid"
),
strlen
(
"pubid"
),
NULL
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
V_VT
(
&
dest
)
=
VT_EMPTY
;
hr
=
IMXWriter_get_output
(
writer
,
&
dest
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
dest
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
dest
));
ok
(
!
lstrcmpW
(
_bstr_
(
"<!ENTITY name PUBLIC
\"
pubid
\"
\"
sysid
\"
>
\r\n
"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
ok
(
!
lstrcmpW
(
_bstr_
(
"<!ENTITY name PUBLIC
\"
pubid
\"
\"
sysid
\"
>
\r\n
"
"<!ENTITY name SYSTEM
\"
sysid
\"
>
\r\n
"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
VariantClear
(
&
dest
);
ISAXContentHandler_Release
(
content
);
...
...
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