Allocate one more character, so that the terminating

nullbyte can be copied.
This commit is contained in:
Walter Dörwald 2007-05-18 11:30:40 +00:00
parent 68937b4cbc
commit 9992835c6e

View file

@ -427,7 +427,7 @@ PyObject *PyUnicode_FromString(const char *u)
}
}
unicode = _PyUnicode_New(size);
unicode = _PyUnicode_New(size+1);
if (!unicode)
return NULL;