summaryrefslogtreecommitdiffstats
path: root/Modules/pyexpat.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r--Modules/pyexpat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index e11c153..3f51c12 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -835,7 +835,8 @@ xmlparse_Parse(xmlparseobject *self, PyObject *args)
s += MAX_CHUNK_SIZE;
slen -= MAX_CHUNK_SIZE;
}
- rc = XML_Parse(self->itself, s, slen, isFinal);
+ assert(MAX_CHUNK_SIZE < INT_MAX && slen < INT_MAX);
+ rc = XML_Parse(self->itself, s, (int)slen, isFinal);
done:
if (view.buf != NULL)