diff options
author | Steve Dower <steve.dower@python.org> | 2019-09-09 13:24:15 (GMT) |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2019-09-09 13:24:15 (GMT) |
commit | ef66f31ce21cd759cc0c618c5c42ba6da0a06834 (patch) | |
tree | 8230f71421d2beb407e5b889dd4511017a7cc2e2 /PC/winreg.c | |
parent | 992347d7376765fe3f4fc958fb1be193ba21f6c3 (diff) | |
download | cpython-ef66f31ce21cd759cc0c618c5c42ba6da0a06834.zip cpython-ef66f31ce21cd759cc0c618c5c42ba6da0a06834.tar.gz cpython-ef66f31ce21cd759cc0c618c5c42ba6da0a06834.tar.bz2 |
bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766)
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 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); |