Skip to content

Commit

Permalink
bpo-32587: Fixes unsafe downcast in PC/winreg.c (pythonGH-15766)
Browse files Browse the repository at this point in the history
  • Loading branch information
zooba authored and jaraco committed Sep 9, 2019
1 parent 992347d commit ef66f31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PC/winreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ef66f31

Please sign in to comment.