Merge 3.3

This commit is contained in:
Benjamin Peterson 2014-10-15 23:58:32 -04:00
commit fa5021699a

View file

@ -9651,7 +9651,7 @@ case_operation(PyObject *self,
kind = PyUnicode_KIND(self);
data = PyUnicode_DATA(self);
length = PyUnicode_GET_LENGTH(self);
if (length > PY_SSIZE_T_MAX / (3 * sizeof(Py_UCS4))) {
if ((size_t) length > PY_SSIZE_T_MAX / (3 * sizeof(Py_UCS4))) {
PyErr_SetString(PyExc_OverflowError, "string is too long");
return NULL;
}