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
91390a72
Commit
91390a72
authored
Jan 23, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: ::get_namespaceURI() doesn't reset out pointer on invalid index.
parent
b1480630
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
schema.c
dlls/msxml3/schema.c
+2
-2
schema.c
dlls/msxml3/tests/schema.c
+7
-5
No files found.
dlls/msxml3/schema.c
View file @
91390a72
...
...
@@ -1197,16 +1197,16 @@ static HRESULT WINAPI schema_cache_get_namespaceURI(IXMLDOMSchemaCollection2* if
LONG
index
,
BSTR
*
len
)
{
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection2
(
iface
);
cache_index_data
data
=
{
index
,
len
};
cache_index_data
data
=
{
index
,
len
};
TRACE
(
"(%p)->(%i %p)
\n
"
,
This
,
index
,
len
);
if
(
!
len
)
return
E_POINTER
;
*
len
=
NULL
;
if
(
index
>=
xmlHashSize
(
This
->
cache
))
return
E_FAIL
;
*
len
=
NULL
;
xmlHashScan
(
This
->
cache
,
cache_index
,
&
data
);
return
S_OK
;
}
...
...
dlls/msxml3/tests/schema.c
View file @
91390a72
...
...
@@ -853,11 +853,12 @@ static void test_length(void)
static
void
test_collection_content
(
void
)
{
IXMLDOMDocument2
*
schema1
,
*
schema2
,
*
schema3
,
*
schema4
,
*
schema5
;
BSTR
content
[
5
]
=
{
NULL
,
NULL
,
NULL
,
NULL
,
NULL
};
IXMLDOMSchemaCollection
*
cache1
,
*
cache2
;
VARIANT_BOOL
b
;
BSTR
bstr
;
BSTR
content
[
5
]
=
{
NULL
,
NULL
,
NULL
,
NULL
,
NULL
};
LONG
length
;
HRESULT
hr
;
BSTR
bstr
;
int
i
,
j
;
schema1
=
create_document_version
(
30
,
&
IID_IXMLDOMDocument2
);
...
...
@@ -935,10 +936,11 @@ static void test_collection_content(void)
IXMLDOMDocument2_Release
(
schema5
);
}
bstr
=
NULL
;
bstr
=
(
void
*
)
0xdeadbeef
;
/* error if index is out of range */
ole_expect
(
IXMLDOMSchemaCollection_get_namespaceURI
(
cache1
,
3
,
&
bstr
),
E_FAIL
);
SysFreeString
(
bstr
);
hr
=
IXMLDOMSchemaCollection_get_namespaceURI
(
cache1
,
3
,
&
bstr
);
EXPECT_HR
(
hr
,
E_FAIL
);
ok
(
bstr
==
(
void
*
)
0xdeadbeef
,
"got %p
\n
"
,
bstr
);
/* error if return pointer is NULL */
ole_expect
(
IXMLDOMSchemaCollection_get_namespaceURI
(
cache1
,
0
,
NULL
),
E_POINTER
);
/* pointer is checked first */
...
...
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