Kaydet (Commit) db1c399f authored tarafından Martin v. Löwis's avatar Martin v. Löwis

Issue #6093: Fix off-by-one error in locale.strxfrm.

üst eccb2ce3
......@@ -54,6 +54,11 @@ Library
now it does. This also means getfp method now returns the real fp.
Extension Modules
-----------------
- Issue #6093: Fix off-by-one error in locale.strxfrm.
Tests
-----
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment