From 984dfa7eed5a2c4673a5cc108f6bad1401e83440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Valur=20J=C3=B3nsson?= Date: Mon, 2 Apr 2012 15:23:29 +0000 Subject: Issue #14471: Fix a possible buffer overrun in the winreg module. --- PC/winreg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'PC/winreg.c') diff --git a/PC/winreg.c b/PC/winreg.c index 1bc47b958b..240ca69c39 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; -- cgit v1.2.1