Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9e09c26e
Commit
9e09c26e
authored
Jul 18, 2013
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #18501, #18408: Fix expat handlers in pyexpat, don't call Python
functions if a Python exception was raised
parent
3fd8cbd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
Modules/pyexpat.c
Modules/pyexpat.c
+15
-0
No files found.
Modules/pyexpat.c
View file @
9e09c26e
...
...
@@ -402,6 +402,10 @@ static void
my_CharacterDataHandler
(
void
*
userData
,
const
XML_Char
*
data
,
int
len
)
{
xmlparseobject
*
self
=
(
xmlparseobject
*
)
userData
;
if
(
PyErr_Occurred
())
return
;
if
(
self
->
buffer
==
NULL
)
call_character_handler
(
self
,
data
,
len
);
else
{
...
...
@@ -436,6 +440,9 @@ my_StartElementHandler(void *userData,
PyObject
*
container
,
*
rv
,
*
args
;
int
i
,
max
;
if
(
PyErr_Occurred
())
return
;
if
(
flush_character_buffer
(
self
)
<
0
)
return
;
/* Set max to the number of slots filled in atts[]; max/2 is
...
...
@@ -519,6 +526,8 @@ my_##NAME##Handler PARAMS {\
INIT \
\
if (have_handler(self, NAME)) { \
if (PyErr_Occurred()) \
return RETURN; \
if (flush_character_buffer(self) < 0) \
return RETURN; \
args = Py_BuildValue PARAM_FORMAT ;\
...
...
@@ -633,6 +642,9 @@ my_ElementDeclHandler(void *userData,
PyObject
*
rv
=
NULL
;
PyObject
*
modelobj
,
*
nameobj
;
if
(
PyErr_Occurred
())
return
;
if
(
flush_character_buffer
(
self
)
<
0
)
goto
finally
;
modelobj
=
conv_content_model
(
model
,
(
conv_string_to_unicode
));
...
...
@@ -1125,6 +1137,9 @@ PyUnknownEncodingHandler(void *encodingHandlerData,
void
*
data
;
unsigned
int
kind
;
if
(
PyErr_Occurred
())
return
XML_STATUS_ERROR
;
if
(
template_buffer
[
1
]
==
0
)
{
for
(
i
=
0
;
i
<
256
;
i
++
)
template_buffer
[
i
]
=
i
;
...
...
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