bpo-44032: Fix downcast conversion in frameobject.c (GH-26291)

This commit is contained in:
Pablo Galindo 2021-05-21 19:15:39 +01:00 committed by GitHub
parent b06ed1d883
commit 498383c019
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -838,7 +838,7 @@ _PyFrame_TakeLocals(PyFrameObject *f)
{
assert(f->f_own_locals_memory == 0);
assert(f->f_stackdepth == 0);
int size = frame_nslots(f);
Py_ssize_t size = frame_nslots(f);
PyObject **copy = PyMem_Malloc(sizeof(PyObject *)*size);
if (copy == NULL) {
for (int i = 0; i < size; i++) {