diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-05-18 11:30:40 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-05-18 11:30:40 (GMT) |
commit | 9992835c6edd105e30722d76c97e4d84a5075a48 (patch) | |
tree | 58c7ccb461572586cc76f2b29e89c57dcd50fb55 /Objects | |
parent | 68937b4cbcc3e88d4207e6391a311f9b7d067b71 (diff) | |
download | cpython-9992835c6edd105e30722d76c97e4d84a5075a48.zip cpython-9992835c6edd105e30722d76c97e4d84a5075a48.tar.gz cpython-9992835c6edd105e30722d76c97e4d84a5075a48.tar.bz2 |
Allocate one more character, so that the terminating
nullbyte can be copied.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 7e455a5..9937705 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; |