[Python-checkins] cpython (merge 3.2 -> default): Merge with 3.2 (Issue #14471)
kristjan.jonsson
python-checkins at python.org
Mon Apr 2 17:41:34 CEST 2012
http://hg.python.org/cpython/rev/80d814d7b886
changeset: 76071:80d814d7b886
parent: 76069:b92e34c1e07c
parent: 76070:b3639f6aaa2b
user: Kristján Valur Jónsson <kristjan at ccpgames.com>
date: Mon Apr 02 15:41:06 2012 +0000
summary:
Merge with 3.2 (Issue #14471)
files:
Misc/NEWS | 2 ++
PC/winreg.c | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -56,6 +56,8 @@
- Issue #14435: Remove dedicated block allocator from floatobject.c and rely
on the PyObject_Malloc() api like all other objects.
+- Issue #14471: Fix a possible buffer overrun in the winreg module.
+
Library
-------
diff --git a/PC/winreg.c b/PC/winreg.c
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -1122,7 +1122,7 @@
* nul. RegEnumKeyEx requires a 257 character buffer to
* retrieve such a key name. */
wchar_t tmpbuf[257];
- DWORD len = sizeof(tmpbuf); /* includes NULL terminator */
+ DWORD len = sizeof(tmpbuf)/sizeof(wchar_t); /* includes NULL terminator */
if (!PyArg_ParseTuple(args, "Oi:EnumKey", &obKey, &index))
return NULL;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list