mirror of
https://github.com/python/cpython
synced 2024-09-05 16:38:56 +00:00
bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766)
This commit is contained in:
parent
992347d737
commit
ef66f31ce2
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue