mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
silence an overflow warning. slen is smaller than 1MB
This commit is contained in:
parent
d6dc952e17
commit
ba723200ce
1 changed files with 2 additions and 1 deletions
|
|
@ -835,7 +835,8 @@ xmlparse_Parse(xmlparseobject *self, PyObject *args)
|
||||||
s += MAX_CHUNK_SIZE;
|
s += MAX_CHUNK_SIZE;
|
||||||
slen -= 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:
|
done:
|
||||||
if (view.buf != NULL)
|
if (view.buf != NULL)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue