make sure length is unsigned
This commit is contained in:
parent
e1bd38c03c
commit
c0e64f5027
|
@ -9489,7 +9489,7 @@ case_operation(PyObject *self,
|
|||
PyErr_SetString(PyExc_OverflowError, "string is too long");
|
||||
return NULL;
|
||||
}
|
||||
tmp = PyMem_MALLOC(sizeof(Py_UCS4) * 3 * length);
|
||||
tmp = PyMem_MALLOC(sizeof(Py_UCS4) * 3 * (size_t)length);
|
||||
if (tmp == NULL)
|
||||
return PyErr_NoMemory();
|
||||
newlength = perform(kind, data, length, tmp, &maxchar);
|
||||
|
|
Loading…
Reference in New Issue