bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766)

This commit is contained in:
Steve Dower 2019-09-09 06:24:15 -07:00 committed by Jason R. Coombs
parent 992347d737
commit ef66f31ce2
1 changed files with 1 additions and 1 deletions

View File

@ -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);