diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-09-09 14:23:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-09 14:23:37 (GMT) |
commit | 44729c9f5198211faf533da49fa0fa26693a1993 (patch) | |
tree | e96b97bb71f37493dd3f195b5346d4d2bf10b4af /PC | |
parent | 5d695b6b7bcccf5f028cdacd986096de15bc0ca6 (diff) | |
download | cpython-44729c9f5198211faf533da49fa0fa26693a1993.zip cpython-44729c9f5198211faf533da49fa0fa26693a1993.tar.gz cpython-44729c9f5198211faf533da49fa0fa26693a1993.tar.bz2 |
bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766)
(cherry picked from commit ef66f31ce21cd759cc0c618c5c42ba6da0a06834)
Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'PC')
-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 37bc2c7..72a7c38 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -772,7 +772,7 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ) return NULL; } PyList_SET_ITEM(obData, index, uni); - len -= slen + 1; + len -= Py_SAFE_DOWNCAST(slen + 1, size_t, int); } PyMem_Free(str); |