]> granicus.if.org Git - python/commitdiff
Issue #9566: explain why (int)len cannot underflow
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 4 Jan 2011 21:58:10 +0000 (21:58 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 4 Jan 2011 21:58:10 +0000 (21:58 +0000)
Modules/pyexpat.c

index dea682d412e5d40d5877f2b7a5559a90bd5eab35..21ab0882ca1a06ddd00f38c049024d017a6f40a6 100644 (file)
@@ -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;
 }