diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-05-18 17:09:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 17:09:59 (GMT) |
commit | 460eac20a625d5dcef409dadc120a26d272a8013 (patch) | |
tree | 0a44e431d9a3c128e3ff0935928b7d47b25c63f9 /PC | |
parent | ab9d9535aad5e627cb9ae471f186e27a65e48c6e (diff) | |
download | cpython-460eac20a625d5dcef409dadc120a26d272a8013.zip cpython-460eac20a625d5dcef409dadc120a26d272a8013.tar.gz cpython-460eac20a625d5dcef409dadc120a26d272a8013.tar.bz2 |
bpo-35890: Use RegQueryInfoKeyW and CryptAcquireContextW explicitly (GH-19974)
(cherry picked from commit 98e42d1f882b9b59f587d538c562dbc7d11c64c3)
Co-authored-by: Minmin Gong <gongminmin@msn.com>
Diffstat (limited to 'PC')
-rw-r--r-- | PC/getpathp.c | 2 | ||||
-rw-r--r-- | PC/winreg.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c index 3747ffb..53653c8 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -405,7 +405,7 @@ getpythonregpath(HKEY keyBase, int skipcore) goto done; } /* Find out how big our core buffer is, and how many subkeys we have */ - rc = RegQueryInfoKey(newKey, NULL, NULL, NULL, &numKeys, NULL, NULL, + rc = RegQueryInfoKeyW(newKey, NULL, NULL, NULL, &numKeys, NULL, NULL, NULL, NULL, &dataSize, NULL, NULL); if (rc!=ERROR_SUCCESS) { goto done; diff --git a/PC/winreg.c b/PC/winreg.c index 5dff7de..caad18e 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -1451,9 +1451,9 @@ winreg_QueryInfoKey_impl(PyObject *module, HKEY key) if (PySys_Audit("winreg.QueryInfoKey", "n", (Py_ssize_t)key) < 0) { return NULL; } - if ((rc = RegQueryInfoKey(key, NULL, NULL, 0, &nSubKeys, NULL, NULL, - &nValues, NULL, NULL, NULL, &ft)) - != ERROR_SUCCESS) { + if ((rc = RegQueryInfoKeyW(key, NULL, NULL, 0, &nSubKeys, NULL, NULL, + &nValues, NULL, NULL, NULL, &ft)) + != ERROR_SUCCESS) { return PyErr_SetFromWindowsErrWithFunction(rc, "RegQueryInfoKey"); } li.LowPart = ft.dwLowDateTime; |