summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-11-22 00:46:18 +0100
committerChristian Heimes <christian@cheimes.de>2013-11-22 00:46:18 +0100
commitba723200ce3effa5bea05a10fd01e3bb89ea8da7 (patch)
tree11a37e4c6acf698237c687bc00f4d0899d420013
parentd6dc952e17d11aace7bb9890bb2a2194308d8e4f (diff)
downloadcpython-git-ba723200ce3effa5bea05a10fd01e3bb89ea8da7.tar.gz
silence an overflow warning. slen is smaller than 1MB
-rw-r--r--Modules/pyexpat.c3
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)