summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2007-04-03 04:35:59 (GMT)
committerMatthias Klose <doko@ubuntu.com>2007-04-03 04:35:59 (GMT)
commite19e0c21aeeaf2aca6b044dd57070880ee76b9f5 (patch)
tree81f01d89ccee79ff6f9197c21b426d6deed58178 /Modules
parent9e56d5beebc4a14396e223e6a8800d81117f76cc (diff)
downloadcpython-e19e0c21aeeaf2aca6b044dd57070880ee76b9f5.zip
cpython-e19e0c21aeeaf2aca6b044dd57070880ee76b9f5.tar.gz
cpython-e19e0c21aeeaf2aca6b044dd57070880ee76b9f5.tar.bz2
- Fix an off-by-one bug in locale.strxfrm().
patch taken from http://bugs.debian.org/416934.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_localemodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
index abfca4e..02e9e53 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -360,7 +360,7 @@ PyLocale_strxfrm(PyObject* self, PyObject* args)
buf = PyMem_Malloc(n1);
if (!buf)
return PyErr_NoMemory();
- n2 = strxfrm(buf, s, n1);
+ n2 = strxfrm(buf, s, n1) + 1;
if (n2 > n1) {
/* more space needed */
buf = PyMem_Realloc(buf, n2);