diff options
-rw-r--r-- | Modules/pyexpat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index e11c15355b..3f51c12ceb 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) |