From 135d5f49f6da605bb1073f939e826e352a2d655f Mon Sep 17 00:00:00 2001 From: "Eric V. Smith" Date: Fri, 5 Feb 2016 18:23:08 -0500 Subject: Fix issue 26287: While handling FORMAT_VALUE opcode, the top of stack was being corrupted if an error occurred in PyObject_Format(). --- Python/ceval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python') diff --git a/Python/ceval.c b/Python/ceval.c index 743a969f6b..b815ccd9d0 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3383,7 +3383,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) int have_fmt_spec = (oparg & FVS_MASK) == FVS_HAVE_SPEC; fmt_spec = have_fmt_spec ? POP() : NULL; - value = TOP(); + value = POP(); /* See if any conversion is specified. */ switch (which_conversion) { @@ -3426,7 +3426,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) goto error; } - SET_TOP(result); + PUSH(result); DISPATCH(); } -- cgit v1.2.1