Kaydet (Commit) 62de65b2 authored tarafından Tim Peters's avatar Tim Peters

PyString_FromString: this requires its argument be non-NULL, but doesn't

check it.  Added an assert() to that effect.
üst 604ddf80
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment