[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4

benjamin.peterson python-checkins at python.org
Wed Oct 15 17:51:53 CEST 2014


https://hg.python.org/cpython/rev/d0f8f242531b
changeset:   93073:d0f8f242531b
parent:      93070:c2980ec10a4c
parent:      93072:a6d0b1275d4b
user:        Benjamin Peterson <benjamin at python.org>
date:        Wed Oct 15 11:51:17 2014 -0400
summary:
  Merge 3.4

files:
  Objects/unicodeobject.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -9680,7 +9680,7 @@
         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);

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list