commit | 5d2d2ef1f5b23abf8d67437fb7288644053657eb | [log] [tgz] |
---|---|---|
author | Matthias Klose <doko@ubuntu.com> | Tue Apr 03 04:39:34 2007 +0000 |
committer | Matthias Klose <doko@ubuntu.com> | Tue Apr 03 04:39:34 2007 +0000 |
tree | 056765121e1906db4f3829fc0fcc7d8ef93327cb | |
parent | 95289052f77f91c09c75cfcd699a6651cd13bb9c [diff] [blame] |
- Fix an off-by-one bug in locale.strxfrm(). Patch taken from http://bugs.debian.org/416934.
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 @@ 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);