From 71d48f303002dcc1a9444795f5d1c8f30d71f670 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 23 May 2009 10:44:10 +0000 Subject: [PATCH] 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. ........ --- Misc/NEWS | 5 +++++ Modules/_localemodule.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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: -- 2.47.3