From: Christian Heimes Date: Thu, 21 Nov 2013 23:46:18 +0000 (+0100) Subject: silence an overflow warning. slen is smaller than 1MB X-Git-Tag: v3.4.0b1~138 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba723200ce3effa5bea05a10fd01e3bb89ea8da7;p=thirdparty%2FPython%2Fcpython.git silence an overflow warning. slen is smaller than 1MB --- diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index e11c15355b83..3f51c12cebce 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)