From ba723200ce3effa5bea05a10fd01e3bb89ea8da7 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 22 Nov 2013 00:46:18 +0100 Subject: [PATCH] silence an overflow warning. slen is smaller than 1MB --- Modules/pyexpat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.47.3