Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0b31c53e
Commit
0b31c53e
authored
Nov 28, 2023
by
Daniel Lehman
Committed by
Alexandre Julliard
Dec 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Handle null prefix in get_item.
parent
d81df26f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
10 deletions
+22
-10
element.c
dlls/msxml3/element.c
+9
-4
domdoc.c
dlls/msxml3/tests/domdoc.c
+4
-2
domdoc.c
dlls/msxml4/tests/domdoc.c
+5
-2
domdoc.c
dlls/msxml6/tests/domdoc.c
+4
-2
No files found.
dlls/msxml3/element.c
View file @
0b31c53e
...
...
@@ -1827,11 +1827,16 @@ static HRESULT domelem_get_item(const xmlNodePtr node, LONG index, IXMLDOMNode *
if
(
attrIndex
<
index
)
return
S_FALSE
;
xmlns
=
xmlNewNs
(
NULL
,
BAD_CAST
"http://www.w3.org/2000/xmlns/"
,
BAD_CAST
"xmlns"
);
if
(
!
xmlns
)
return
E_OUTOFMEMORY
;
if
(
!
ns
->
prefix
)
{
xmlns
=
NULL
;
curr
=
xmlNewProp
(
NULL
,
BAD_CAST
"xmlns"
,
ns
->
href
);
}
else
{
xmlns
=
xmlNewNs
(
NULL
,
BAD_CAST
"http://www.w3.org/2000/xmlns/"
,
BAD_CAST
"xmlns"
);
if
(
!
xmlns
)
return
E_OUTOFMEMORY
;
curr
=
xmlNewNsProp
(
NULL
,
xmlns
,
ns
->
prefix
,
ns
->
href
);
curr
=
xmlNewNsProp
(
NULL
,
xmlns
,
ns
->
prefix
,
ns
->
href
);
}
if
(
!
curr
)
{
xmlFreeNs
(
xmlns
);
return
E_OUTOFMEMORY
;
...
...
dlls/msxml3/tests/domdoc.c
View file @
0b31c53e
...
...
@@ -13773,9 +13773,7 @@ static void test_namespaces_as_attributes(void)
{
item
=
NULL
;
hr
=
IXMLDOMNamedNodeMap_get_item
(
map
,
i
,
&
item
);
todo_wine_if
(
test
->
todo
)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
continue
;
str
=
NULL
;
hr
=
IXMLDOMNode_get_nodeName
(
item
,
&
str
);
...
...
@@ -13787,8 +13785,10 @@ static void test_namespaces_as_attributes(void)
hr
=
IXMLDOMNode_get_prefix
(
item
,
&
str
);
if
(
test
->
prefixes
[
i
])
{
todo_wine_if
(
test
->
todo
)
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
test
->
prefixes
[
i
])),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
}
SysFreeString
(
str
);
}
else
...
...
@@ -13797,6 +13797,7 @@ static void test_namespaces_as_attributes(void)
str
=
NULL
;
hr
=
IXMLDOMNode_get_baseName
(
item
,
&
str
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine_if
(
test
->
todo
)
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
test
->
basenames
[
i
])),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
...
...
@@ -13804,6 +13805,7 @@ static void test_namespaces_as_attributes(void)
hr
=
IXMLDOMNode_get_namespaceURI
(
item
,
&
str
);
if
(
test
->
uris
[
i
])
{
todo_wine_if
(
test
->
todo
)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
test
->
prefixes
[
i
]
&&
!
strcmp
(
test
->
prefixes
[
i
],
"xmlns"
))
ok
(
!
SysStringLen
(
str
),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
...
...
dlls/msxml4/tests/domdoc.c
View file @
0b31c53e
...
...
@@ -256,9 +256,7 @@ static void test_namespaces_as_attributes(void)
{
item
=
NULL
;
hr
=
IXMLDOMNamedNodeMap_get_item
(
map
,
i
,
&
item
);
todo_wine_if
(
test
->
todo
)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
continue
;
str
=
NULL
;
hr
=
IXMLDOMNode_get_nodeName
(
item
,
&
str
);
...
...
@@ -271,9 +269,11 @@ static void test_namespaces_as_attributes(void)
if
(
test
->
prefixes
[
i
])
{
/* MSXML4 can report different results with different service packs */
todo_wine_if
(
test
->
todo
)
{
ok
(
hr
==
S_OK
||
broken
(
hr
==
S_FALSE
),
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
test
->
prefixes
[
i
])
||
broken
(
!
str
),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
}
SysFreeString
(
str
);
}
else
...
...
@@ -283,6 +283,7 @@ static void test_namespaces_as_attributes(void)
hr
=
IXMLDOMNode_get_baseName
(
item
,
&
str
);
/* MSXML4 can report different results with different service packs */
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine_if
(
test
->
todo
)
ok
(
!
lstrcmpW
(
str
,
test
->
basenames
[
i
])
||
broken
(
!
lstrcmpW
(
str
,
L"xmlns"
)),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
...
...
@@ -291,11 +292,13 @@ static void test_namespaces_as_attributes(void)
hr
=
IXMLDOMNode_get_namespaceURI
(
item
,
&
str
);
if
(
test
->
uris
[
i
])
{
todo_wine_if
(
test
->
todo
)
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
test
->
prefixes
[
i
]
&&
!
lstrcmpW
(
test
->
prefixes
[
i
],
L"xmlns"
))
ok
(
!
lstrcmpW
(
str
,
L""
),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
else
ok
(
!
lstrcmpW
(
str
,
test
->
uris
[
i
]),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
}
SysFreeString
(
str
);
}
else
...
...
dlls/msxml6/tests/domdoc.c
View file @
0b31c53e
...
...
@@ -263,9 +263,7 @@ static void test_namespaces_as_attributes(void)
{
item
=
NULL
;
hr
=
IXMLDOMNamedNodeMap_get_item
(
map
,
i
,
&
item
);
todo_wine_if
(
test
->
todo
)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
continue
;
str
=
NULL
;
hr
=
IXMLDOMNode_get_nodeName
(
item
,
&
str
);
...
...
@@ -277,8 +275,10 @@ static void test_namespaces_as_attributes(void)
hr
=
IXMLDOMNode_get_prefix
(
item
,
&
str
);
if
(
test
->
prefixes
[
i
])
{
todo_wine_if
(
test
->
todo
)
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
test
->
prefixes
[
i
]),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
}
SysFreeString
(
str
);
}
else
...
...
@@ -294,12 +294,14 @@ static void test_namespaces_as_attributes(void)
hr
=
IXMLDOMNode_get_namespaceURI
(
item
,
&
str
);
if
(
test
->
uris
[
i
])
{
todo_wine_if
(
test
->
todo
)
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
test
->
prefixes
[
i
]
&&
!
lstrcmpW
(
test
->
prefixes
[
i
],
L"xmlns"
))
ok
(
!
lstrcmpW
(
str
,
L"http://www.w3.org/2000/xmlns/"
),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
else
ok
(
!
lstrcmpW
(
str
,
test
->
uris
[
i
]),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
}
SysFreeString
(
str
);
}
else
...
...
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