summaryrefslogtreecommitdiff
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-10-15 11:51:05 -0400
committerBenjamin Peterson <benjamin@python.org>2014-10-15 11:51:05 -0400
commitc0e64f5027a2d07976027447b6d1ef464a2dc158 (patch)
tree7293eb88fad65daee227581abf9f6c57b552a848 /Objects
parente1bd38c03c16cd27227b3148d2be0ef1ab678448 (diff)
downloadcpython-git-c0e64f5027a2d07976027447b6d1ef464a2dc158.tar.gz
make sure length is unsigned
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 35da457530..2a10eec5eb 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -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);