diff options
author | Christian Heimes <christian@cheimes.de> | 2013-11-21 23:46:18 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-11-21 23:46:18 (GMT) |
commit | ba723200ce3effa5bea05a10fd01e3bb89ea8da7 (patch) | |
tree | 11a37e4c6acf698237c687bc00f4d0899d420013 /Modules/pyexpat.c | |
parent | d6dc952e17d11aace7bb9890bb2a2194308d8e4f (diff) | |
download | cpython-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.c | 3 |
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) |