From: Guido van Rossum Date: Wed, 23 Aug 2023 22:36:19 +0000 (-0700) Subject: gh-108253: Fix reads of uninitialized memory in funcobject.c (#108383) X-Git-Tag: v3.13.0a1~819 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3107b453bcceb0e2d2590fef3612859f2f802d72;p=thirdparty%2FPython%2Fcpython.git gh-108253: Fix reads of uninitialized memory in funcobject.c (#108383) --- diff --git a/Objects/funcobject.c b/Objects/funcobject.c index 2820e47bdf2e..648b660859c0 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -131,7 +131,7 @@ _PyFunction_FromConstructor(PyFrameConstructor *constr) op->func_annotations = NULL; op->func_typeparams = NULL; op->vectorcall = _PyFunction_Vectorcall; - _PyFunction_SetVersion(op, 0); + op->func_version = 0; _PyObject_GC_TRACK(op); handle_func_event(PyFunction_EVENT_CREATE, op, NULL); return op; @@ -207,7 +207,7 @@ PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname op->func_annotations = NULL; op->func_typeparams = NULL; op->vectorcall = _PyFunction_Vectorcall; - _PyFunction_SetVersion(op, 0); + op->func_version = 0; _PyObject_GC_TRACK(op); handle_func_event(PyFunction_EVENT_CREATE, op, NULL); return (PyObject *)op;