diff options
author | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-04-02 15:23:29 +0000 |
---|---|---|
committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-04-02 15:23:29 +0000 |
commit | 984dfa7eed5a2c4673a5cc108f6bad1401e83440 (patch) | |
tree | f03bd023e56252c8428e013855c2ea9062edfdb9 /PC/winreg.c | |
parent | prevent writing to stderr from messing up the exception state (closes #14474) (diff) | |
download | cpython-984dfa7eed5a2c4673a5cc108f6bad1401e83440.tar.gz cpython-984dfa7eed5a2c4673a5cc108f6bad1401e83440.tar.bz2 cpython-984dfa7eed5a2c4673a5cc108f6bad1401e83440.zip |
Issue #14471: Fix a possible buffer overrun in the winreg module.
Diffstat (limited to 'PC/winreg.c')
-rw-r--r-- | PC/winreg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/PC/winreg.c b/PC/winreg.c index 1bc47b958b4..240ca69c397 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -1110,7 +1110,7 @@ PyEnumKey(PyObject *self, PyObject *args) * 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; |