From: Martin v. Löwis Date: Sat, 23 May 2009 10:44:10 +0000 (+0000) Subject: Merged revisions 72844 via svnmerge from X-Git-Tag: 3.0~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71d48f303002dcc1a9444795f5d1c8f30d71f670;p=thirdparty%2FPython%2Fcpython.git Merged revisions 72844 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r72844 | martin.v.loewis | 2009-05-23 12:38:26 +0200 (Sa, 23 Mai 2009) | 2 lines Issue #6093: Fix off-by-one error in locale.strxfrm. ........ --- diff --git a/Misc/NEWS b/Misc/NEWS index 668786fe4079..2b40d6835b1c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -160,6 +160,11 @@ Library - Issue #2703: SimpleXMLRPCDispatcher.__init__: Provide default values for new arguments introduced in 2.5. +Extension Modules +----------------- + +- Issue #6093: Fix off-by-one error in locale.strxfrm. + Build ----- diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index 432df36973dd..50378a72860a 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: