summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-05-18 11:30:40 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-05-18 11:30:40 (GMT)
commit9992835c6edd105e30722d76c97e4d84a5075a48 (patch)
tree58c7ccb461572586cc76f2b29e89c57dcd50fb55
parent68937b4cbcc3e88d4207e6391a311f9b7d067b71 (diff)
downloadcpython-9992835c6edd105e30722d76c97e4d84a5075a48.zip
cpython-9992835c6edd105e30722d76c97e4d84a5075a48.tar.gz
cpython-9992835c6edd105e30722d76c97e4d84a5075a48.tar.bz2
Allocate one more character, so that the terminating
nullbyte can be copied.
-rw-r--r--Objects/unicodeobject.c2
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;