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
8889b66f
Commit
8889b66f
authored
Mar 08, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Check for unsafe cast in addCollection().
parent
f73e0215
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
schema.c
dlls/msxml3/schema.c
+24
-4
No files found.
dlls/msxml3/schema.c
View file @
8889b66f
...
@@ -786,11 +786,23 @@ static LONG cache_entry_release(cache_entry* entry)
...
@@ -786,11 +786,23 @@ static LONG cache_entry_release(cache_entry* entry)
return
ref
;
return
ref
;
}
}
static
const
struct
IXMLDOMSchemaCollection2Vtbl
XMLDOMSchemaCollection2Vtbl
;
static
inline
schema_cache
*
impl_from_IXMLDOMSchemaCollection2
(
IXMLDOMSchemaCollection2
*
iface
)
static
inline
schema_cache
*
impl_from_IXMLDOMSchemaCollection2
(
IXMLDOMSchemaCollection2
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
schema_cache
,
IXMLDOMSchemaCollection2_iface
);
return
CONTAINING_RECORD
(
iface
,
schema_cache
,
IXMLDOMSchemaCollection2_iface
);
}
}
static
inline
schema_cache
*
impl_from_IXMLDOMSchemaCollection
(
IXMLDOMSchemaCollection
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
schema_cache
,
IXMLDOMSchemaCollection2_iface
);
}
static
inline
schema_cache
*
unsafe_impl_from_IXMLDOMSchemaCollection
(
IXMLDOMSchemaCollection
*
iface
)
{
return
iface
->
lpVtbl
==
(
void
*
)
&
XMLDOMSchemaCollection2Vtbl
?
impl_from_IXMLDOMSchemaCollection
(
iface
)
:
NULL
;
}
static
inline
CacheEntryType
cache_type_from_xmlDocPtr
(
xmlDocPtr
schema
)
static
inline
CacheEntryType
cache_type_from_xmlDocPtr
(
xmlDocPtr
schema
)
{
{
xmlNodePtr
root
=
NULL
;
xmlNodePtr
root
=
NULL
;
...
@@ -1292,15 +1304,23 @@ static void cache_copy(void* data, void* dest, xmlChar* name)
...
@@ -1292,15 +1304,23 @@ static void cache_copy(void* data, void* dest, xmlChar* name)
}
}
static
HRESULT
WINAPI
schema_cache_addCollection
(
IXMLDOMSchemaCollection2
*
iface
,
static
HRESULT
WINAPI
schema_cache_addCollection
(
IXMLDOMSchemaCollection2
*
iface
,
IXMLDOMSchemaCollection
*
otherC
ollection
)
IXMLDOMSchemaCollection
*
c
ollection
)
{
{
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection2
(
iface
);
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection2
(
iface
);
schema_cache
*
That
=
impl_from_IXMLDOMSchemaCollection2
((
IXMLDOMSchemaCollection2
*
)
otherCollection
);
schema_cache
*
That
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
That
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
collection
);
if
(
!
otherC
ollection
)
if
(
!
c
ollection
)
return
E_POINTER
;
return
E_POINTER
;
That
=
unsafe_impl_from_IXMLDOMSchemaCollection
(
collection
);
if
(
!
That
)
{
ERR
(
"external collection implementation
\n
"
);
return
E_FAIL
;
}
/* TODO: detect errors while copying & return E_FAIL */
/* TODO: detect errors while copying & return E_FAIL */
xmlHashScan
(
That
->
cache
,
cache_copy
,
This
);
xmlHashScan
(
That
->
cache
,
cache_copy
,
This
);
...
...
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