]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44032: Fix downcast conversion in frameobject.c (GH-26291)
authorPablo Galindo <Pablogsal@gmail.com>
Fri, 21 May 2021 18:15:39 +0000 (19:15 +0100)
committerGitHub <noreply@github.com>
Fri, 21 May 2021 18:15:39 +0000 (19:15 +0100)
Objects/frameobject.c

index 1781c3cff73786eab0b9161ec890117234aeb794..87c485202c24e2aebab80d433e7acc7ae0b6a69c 100644 (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++) {