Merge with 3.2 (Issue #14471)

This commit is contained in:
Kristján Valur Jónsson 2012-04-02 15:41:06 +00:00
commit 2247775bfa
2 changed files with 3 additions and 1 deletions

View File

@ -56,6 +56,8 @@ Core and Builtins
- Issue #14435: Remove dedicated block allocator from floatobject.c and rely - Issue #14435: Remove dedicated block allocator from floatobject.c and rely
on the PyObject_Malloc() api like all other objects. on the PyObject_Malloc() api like all other objects.
- Issue #14471: Fix a possible buffer overrun in the winreg module.
Library Library
------- -------

View File

@ -1122,7 +1122,7 @@ PyEnumKey(PyObject *self, PyObject *args)
* nul. RegEnumKeyEx requires a 257 character buffer to * nul. RegEnumKeyEx requires a 257 character buffer to
* retrieve such a key name. */ * retrieve such a key name. */
wchar_t tmpbuf[257]; 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)) if (!PyArg_ParseTuple(args, "Oi:EnumKey", &obKey, &index))
return NULL; return NULL;