From: Walter Dörwald Date: Fri, 18 May 2007 11:30:40 +0000 (+0000) Subject: Allocate one more character, so that the terminating X-Git-Tag: v3.0a1~928 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9992835c6edd105e30722d76c97e4d84a5075a48;p=thirdparty%2FPython%2Fcpython.git Allocate one more character, so that the terminating nullbyte can be copied. --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 7e455a5e3287..9937705eef1d 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -427,7 +427,7 @@ PyObject *PyUnicode_FromString(const char *u) } } - unicode = _PyUnicode_New(size); + unicode = _PyUnicode_New(size+1); if (!unicode) return NULL;