summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2016-02-05 23:23:08 (GMT)
committerEric V. Smith <eric@trueblade.com>2016-02-05 23:23:08 (GMT)
commit135d5f49f6da605bb1073f939e826e352a2d655f (patch)
tree28bc42218ba2447d4b8b078f47fb16274e0bf751 /Python
parenta3643c280f7ed819d2caaa52cb0094a8f2267000 (diff)
downloadcpython-135d5f49f6da605bb1073f939e826e352a2d655f.zip
cpython-135d5f49f6da605bb1073f939e826e352a2d655f.tar.gz
cpython-135d5f49f6da605bb1073f939e826e352a2d655f.tar.bz2
Fix issue 26287: While handling FORMAT_VALUE opcode, the top of stack was being corrupted if an error occurred in PyObject_Format().
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 743a969..b815ccd 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();
}