mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
silence an overflow warning. slen is smaller than 1MB
This commit is contained in:
parent
d6dc952e17
commit
ba723200ce
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user