summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2009-05-23 10:38:26 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2009-05-23 10:38:26 (GMT)
commitdb1c399fe08d8dc74916b3c945c8bc551b00ff7b (patch)
tree99c782c014760fad819912ac68155fc67979f715 /Modules
parenteccb2ce3c03b2cbf9ce84e4c994441f1eab12ba2 (diff)
downloadcpython-db1c399fe08d8dc74916b3c945c8bc551b00ff7b.zip
cpython-db1c399fe08d8dc74916b3c945c8bc551b00ff7b.tar.gz
cpython-db1c399fe08d8dc74916b3c945c8bc551b00ff7b.tar.bz2
Issue #6093: Fix off-by-one error in locale.strxfrm.
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 432df36..50378a7 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -314,7 +314,7 @@ PyLocale_strxfrm(PyObject* self, PyObject* args)
PyErr_NoMemory();
goto exit;
}
- n2 = wcsxfrm(buf, s, n2);
+ n2 = wcsxfrm(buf, s, n2+1);
}
result = PyUnicode_FromWideChar(buf, n2);
exit: