summaryrefslogtreecommitdiffstats
path: root/Modules/pyexpat.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-11-21 23:46:18 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-11-21 23:46:18 (GMT)
commitba723200ce3effa5bea05a10fd01e3bb89ea8da7 (patch)
tree11a37e4c6acf698237c687bc00f4d0899d420013 /Modules/pyexpat.c
parentd6dc952e17d11aace7bb9890bb2a2194308d8e4f (diff)
downloadcpython-ba723200ce3effa5bea05a10fd01e3bb89ea8da7.zip
cpython-ba723200ce3effa5bea05a10fd01e3bb89ea8da7.tar.gz
cpython-ba723200ce3effa5bea05a10fd01e3bb89ea8da7.tar.bz2
silence an overflow warning. slen is smaller than 1MB
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)