Skip to content

Commit

Permalink
pythongh-108253: Fix reads of uninitialized memory in funcobject.c (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum authored Aug 23, 2023
1 parent 513c89d commit 3107b45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Objects/funcobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3107b45

Please sign in to comment.