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