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
f31cd308
Commit
f31cd308
authored
Jan 08, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: createProcessingInstruction: Check arguments are valid.
parent
91ad27ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
domdoc.c
dlls/msxml3/domdoc.c
+6
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+26
-0
No files found.
dlls/msxml3/domdoc.c
View file @
f31cd308
...
...
@@ -958,6 +958,12 @@ static HRESULT WINAPI domdoc_createProcessingInstruction(
TRACE
(
"%p->(%s %s %p)
\n
"
,
iface
,
debugstr_w
(
target
),
debugstr_w
(
data
),
pi
);
if
(
!
pi
)
return
E_INVALIDARG
;
if
(
!
target
||
lstrlenW
(
target
)
==
0
)
return
E_FAIL
;
xml_target
=
xmlChar_from_wchar
((
WCHAR
*
)
target
);
xml_content
=
xmlChar_from_wchar
((
WCHAR
*
)
data
);
...
...
dlls/msxml3/tests/domdoc.c
View file @
f31cd308
...
...
@@ -348,6 +348,7 @@ static void test_domdoc( void )
IXMLDOMComment
*
node_comment
=
NULL
;
IXMLDOMAttribute
*
node_attr
=
NULL
;
IXMLDOMNode
*
nodeChild
=
NULL
;
IXMLDOMProcessingInstruction
*
nodePI
=
NULL
;
VARIANT_BOOL
b
;
VARIANT
var
;
BSTR
str
;
...
...
@@ -548,6 +549,31 @@ static void test_domdoc( void )
ok
(
r
==
S_OK
,
"returns %08x
\n
"
,
r
);
IXMLDOMText_Release
(
node_attr
);
/* test Processing Instruction */
str
=
SysAllocStringLen
(
NULL
,
0
);
r
=
IXMLDOMDocument_createProcessingInstruction
(
doc
,
str
,
str
,
NULL
);
ok
(
r
==
E_INVALIDARG
,
"returns %08x
\n
"
,
r
);
r
=
IXMLDOMDocument_createProcessingInstruction
(
doc
,
NULL
,
str
,
&
nodePI
);
ok
(
r
==
E_FAIL
,
"returns %08x
\n
"
,
r
);
r
=
IXMLDOMDocument_createProcessingInstruction
(
doc
,
str
,
str
,
&
nodePI
);
ok
(
r
==
E_FAIL
,
"returns %08x
\n
"
,
r
);
SysFreeString
(
str
);
r
=
IXMLDOMDocument_createProcessingInstruction
(
doc
,
_bstr_
(
"xml"
),
_bstr_
(
"version=
\"
1.0
\"
"
),
&
nodePI
);
ok
(
r
==
S_OK
,
"returns %08x
\n
"
,
r
);
if
(
nodePI
)
{
/* Last Child Checks */
r
=
IXMLDOMProcessingInstruction_get_lastChild
(
nodePI
,
NULL
);
ok
(
r
==
E_INVALIDARG
,
"ret %08x
\n
"
,
r
);
nodeChild
=
(
IXMLDOMNode
*
)
0x1
;
r
=
IXMLDOMProcessingInstruction_get_lastChild
(
nodePI
,
&
nodeChild
);
ok
(
r
==
S_FALSE
,
"ret %08x
\n
"
,
r
);
ok
(
nodeChild
==
NULL
,
"nodeChild not NULL
\n
"
);
}
IXMLDOMProcessingInstruction_Release
(
nodePI
);
r
=
IXMLDOMDocument_Release
(
doc
);
ok
(
r
==
0
,
"document ref count incorrect
\n
"
);
...
...
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