diff options
-rw-r--r-- | Objects/stringobject.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index cb0e20b..657b200 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -105,8 +105,11 @@ PyString_FromStringAndSize(const char *str, int size) PyObject * PyString_FromString(const char *str) { - register size_t size = strlen(str); + register size_t size; register PyStringObject *op; + + assert(str != NULL); + size = strlen(str); if (size > INT_MAX) { PyErr_SetString(PyExc_OverflowError, "string is too long for a Python string"); |