r58894 - python/branches/release25-maint/Objects/stringobject.c
Author: guido.van.rossum Date: Wed Nov 7 02:19:49 2007 New Revision: 58894 Modified: python/branches/release25-maint/Objects/stringobject.c Log: Backport r58892. Add missing "return NULL" in overflow check in PyString_Repr(). Modified: python/branches/release25-maint/Objects/stringobject.c ============================================================================== --- python/branches/release25-maint/Objects/stringobject.c (original) +++ python/branches/release25-maint/Objects/stringobject.c Wed Nov 7 02:19:49 2007 @@ -861,6 +861,7 @@ if (newsize > PY_SSIZE_T_MAX || newsize / 4 != op->ob_size) { PyErr_SetString(PyExc_OverflowError, "string is too large to make repr"); + return NULL; } v = PyString_FromStringAndSize((char *)NULL, newsize); if (v == NULL) {
participants (1)
-
guido.van.rossum