make sure length is unsigned
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 @@
         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);