[Python-checkins] r46683 - in python/branches/release24-maint: Misc/NEWS Python/sysmodule.c

brett.cannon python-checkins at python.org
Tue Jun 6 01:56:40 CEST 2006


Author: brett.cannon
Date: Tue Jun  6 01:56:36 2006
New Revision: 46683

Modified:
   python/branches/release24-maint/Misc/NEWS
   python/branches/release24-maint/Python/sysmodule.c
Log:
Fix possible buffer overflow on Windows when reading code page.

Backport of fix for bug #1501223.


Modified: python/branches/release24-maint/Misc/NEWS
==============================================================================
--- python/branches/release24-maint/Misc/NEWS	(original)
+++ python/branches/release24-maint/Misc/NEWS	Tue Jun  6 01:56:36 2006
@@ -38,6 +38,9 @@
 Library
 -------
 
+- Bug #1501223: Possible overflow in _PySys_Init() when reading the code page
+  under Windows.
+
 - Patch #1478292. ``doctest.register_optionflag(name)`` shouldn't create a
   new flag when ``name`` is already the name of an option flag.
 

Modified: python/branches/release24-maint/Python/sysmodule.c
==============================================================================
--- python/branches/release24-maint/Python/sysmodule.c	(original)
+++ python/branches/release24-maint/Python/sysmodule.c	Tue Jun  6 01:56:36 2006
@@ -940,7 +940,7 @@
 	PyObject *sysin, *sysout, *syserr;
 	char *s;
 #ifdef MS_WINDOWS
-	char buf[10];
+	char buf[13];
 #endif
 
 	m = Py_InitModule3("sys", sys_methods, sys_doc);


More information about the Python-checkins mailing list