diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-10-15 15:51:05 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-10-15 15:51:05 (GMT) |
commit | c0e64f5027a2d07976027447b6d1ef464a2dc158 (patch) | |
tree | 7293eb88fad65daee227581abf9f6c57b552a848 /Objects | |
parent | e1bd38c03c16cd27227b3148d2be0ef1ab678448 (diff) | |
download | cpython-c0e64f5027a2d07976027447b6d1ef464a2dc158.zip cpython-c0e64f5027a2d07976027447b6d1ef464a2dc158.tar.gz cpython-c0e64f5027a2d07976027447b6d1ef464a2dc158.tar.bz2 |
make sure length is unsigned
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 35da457..2a10eec 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); |