Skip to content

Commit fb434ba

Browse files
committed
gh-142282 Fix winreg_QueryValueEx_impl to use retSize
retSize was ignored bufSize is the size of buffer including uninitializd buffers.
1 parent 53ec7c8 commit fb434ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PC/winreg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ winreg_QueryValueEx_impl(PyObject *module, HKEY key, const wchar_t *name)
16511651
return PyErr_SetFromWindowsErrWithFunction(rc,
16521652
"RegQueryValueEx");
16531653
}
1654-
obData = Reg2Py(retBuf, bufSize, typ);
1654+
obData = Reg2Py(retBuf, retSize, typ);
16551655
PyMem_Free(retBuf);
16561656
if (obData == NULL)
16571657
return NULL;

0 commit comments

Comments
 (0)