summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2019-09-09 13:24:15 (GMT)
committerJason R. Coombs <jaraco@jaraco.com>2019-09-09 13:24:15 (GMT)
commitef66f31ce21cd759cc0c618c5c42ba6da0a06834 (patch)
tree8230f71421d2beb407e5b889dd4511017a7cc2e2
parent992347d7376765fe3f4fc958fb1be193ba21f6c3 (diff)
downloadcpython-ef66f31ce21cd759cc0c618c5c42ba6da0a06834.zip
cpython-ef66f31ce21cd759cc0c618c5c42ba6da0a06834.tar.gz
cpython-ef66f31ce21cd759cc0c618c5c42ba6da0a06834.tar.bz2
bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766)
-rw-r--r--PC/winreg.c2
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);