[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.
Marc-Andre Lemburg
report at bugs.python.org
Tue Apr 29 13:07:50 CEST 2008
Marc-Andre Lemburg <mal at egenix.com> added the comment:
@@ -2195,7 +2200,7 @@
}
return Py_None;
}
- len = lastdot - start;
+ len = (size_t)(lastdot - start);
if (len >= MAXPATHLEN) {
PyErr_SetString(PyExc_ValueError,
"Module name too long");
The above cast needs to be (Py_ssize_t). size_t is an unsigned length type.
----------
nosy: +lemburg
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1950>
__________________________________
More information about the Python-bugs-list
mailing list