From: Victor Stinner Date: Tue, 4 Jan 2011 21:58:10 +0000 (+0000) Subject: Issue #9566: explain why (int)len cannot underflow X-Git-Tag: v3.2rc1~190 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed7e2224542a595a8c1a5e9be92a467983329a28;p=thirdparty%2FPython%2Fcpython.git Issue #9566: explain why (int)len cannot underflow --- diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index dea682d412e5..21ab0882ca1a 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -839,6 +839,7 @@ readinst(char *buf, int buf_size, PyObject *meth) finally: Py_XDECREF(arg); Py_XDECREF(str); + /* len <= buf_size <= INT_MAX (see above) */ return (int)len; }