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
2dc6711f
Commit
2dc6711f
authored
May 08, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Protect content callbacks from being called on reset content handler pointer.
parent
593bd1a5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
saxreader.c
dlls/msxml3/saxreader.c
+8
-12
No files found.
dlls/msxml3/saxreader.c
View file @
2dc6711f
...
...
@@ -313,7 +313,7 @@ static BOOL is_namespaces_enabled(const saxreader *reader)
return
(
reader
->
version
<
MSXML4
)
||
(
reader
->
features
&
Namespaces
);
}
static
inline
BOOL
has_content_handler
(
const
saxlocator
*
locator
)
static
inline
int
has_content_handler
(
const
saxlocator
*
locator
)
{
return
(
locator
->
vbInterface
&&
locator
->
saxreader
->
vbcontentHandler
)
||
(
!
locator
->
vbInterface
&&
locator
->
saxreader
->
contentHandler
);
...
...
@@ -1288,6 +1288,7 @@ static void libxmlStartElementNS(
saxlocator
*
This
=
ctx
;
element_entry
*
element
;
HRESULT
hr
=
S_OK
;
BSTR
uri
;
update_position
(
This
,
TRUE
);
if
(
*
(
This
->
pParserCtxt
->
input
->
cur
)
==
'/'
)
...
...
@@ -1298,15 +1299,11 @@ static void libxmlStartElementNS(
element
=
alloc_element_entry
(
localname
,
prefix
,
nb_namespaces
,
namespaces
);
push_element_ns
(
This
,
element
);
if
(
has_content_handler
(
This
))
{
BSTR
uri
;
if
(
is_namespaces_enabled
(
This
->
saxreader
))
{
int
i
;
for
(
i
=
0
;
i
<
nb_namespaces
;
i
++
)
for
(
i
=
0
;
i
<
nb_namespaces
&&
has_content_handler
(
This
)
;
i
++
)
{
if
(
This
->
vbInterface
)
hr
=
IVBSAXContentHandler_startPrefixMapping
(
...
...
@@ -1330,9 +1327,8 @@ static void libxmlStartElementNS(
}
uri
=
find_element_uri
(
This
,
URI
);
hr
=
SAXAttributes_populate
(
This
,
nb_namespaces
,
namespaces
,
nb_attributes
,
attributes
);
if
(
hr
==
S_OK
)
if
(
hr
==
S_OK
&&
has_content_handler
(
This
)
)
{
BSTR
local
;
...
...
@@ -1350,11 +1346,10 @@ static void libxmlStartElementNS(
local
,
SysStringLen
(
local
),
element
->
qname
,
SysStringLen
(
element
->
qname
),
&
This
->
ISAXAttributes_iface
);
}
}
if
(
sax_callback_failed
(
This
,
hr
))
format_error_message_from_id
(
This
,
hr
);
}
}
static
void
libxmlEndElementNS
(
...
...
@@ -1435,7 +1430,7 @@ static void libxmlEndElementNS(
if
(
is_namespaces_enabled
(
This
->
saxreader
))
{
int
i
=
-
1
;
while
(
iterate_endprefix_index
(
This
,
element
,
&
i
))
while
(
iterate_endprefix_index
(
This
,
element
,
&
i
)
&&
has_content_handler
(
This
)
)
{
if
(
This
->
vbInterface
)
hr
=
IVBSAXContentHandler_endPrefixMapping
(
...
...
@@ -1447,10 +1442,10 @@ static void libxmlEndElementNS(
if
(
sax_callback_failed
(
This
,
hr
))
break
;
}
}
if
(
sax_callback_failed
(
This
,
hr
))
format_error_message_from_id
(
This
,
hr
);
}
free_element_entry
(
element
);
}
...
...
@@ -1587,6 +1582,7 @@ static void libxmlComment(void *ctx, const xmlChar *value)
This
->
line
--
;
p
--
;
}
This
->
column
=
0
;
for
(;
p
>=
This
->
pParserCtxt
->
input
->
base
&&
*
p
!=
'\n'
&&
*
p
!=
'\r'
;
p
--
)
This
->
column
++
;
...
...
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