A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-November/050056.html below:

[Python-Dev] Bug in PyLocale_strcoll

[Python-Dev] Bug in PyLocale_strcoll [Python-Dev] Bug in PyLocale_strcollAndreas Degert ad at papyrus-gmbh.de
Sat Nov 20 22:05:59 CET 2004
sorry to reply to my own post.. corrected patch following

--- _localemodule.c-2.49	Sat Nov 20 22:02:11 2004
+++ _localemodule.c	Sat Nov 20 22:01:48 2004
@@ -313,6 +313,7 @@
     }
     if (PyUnicode_AsWideChar((PyUnicodeObject*)os1, ws1, len1) == -1)
         goto done;
+    ws1[len1-1] = 0;
     ws2 = PyMem_MALLOC(len2 * sizeof(wchar_t));
     if (!ws2) {
         PyErr_NoMemory();
@@ -320,6 +321,7 @@
     }
     if (PyUnicode_AsWideChar((PyUnicodeObject*)os2, ws2, len2) == -1)
         goto done;
+    ws2[len2-1] = 0;
     /* Collate the strings. */
     result = PyInt_FromLong(wcscoll(ws1, ws2));
   done:
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4