From: Brett Cannon Date: Mon, 5 Jun 2006 23:56:36 +0000 (+0000) Subject: Fix possible buffer overflow on Windows when reading code page. X-Git-Tag: v2.4.4c1~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89d862360cc15c20783f4aa0775a3d2450f1bd7b;p=thirdparty%2FPython%2Fcpython.git Fix possible buffer overflow on Windows when reading code page. Backport of fix for bug #1501223. --- diff --git a/Misc/NEWS b/Misc/NEWS index cac884c98dad..93d16279166a 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -38,6 +38,9 @@ Extension Modules 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. diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 1ce016f3f7a1..b51fa86a760c 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -940,7 +940,7 @@ _PySys_Init(void) PyObject *sysin, *sysout, *syserr; char *s; #ifdef MS_WINDOWS - char buf[10]; + char buf[13]; #endif m = Py_InitModule3("sys", sys_methods, sys_doc);