summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-06-12 06:35:13 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-06-12 06:35:13 (GMT)
commitcf2ad555113e4afc6f8cd5ac5235deef6a3fdf82 (patch)
tree902999b38abc5e4f99f7d101e6fb0bc3dd3212a2 /Python/compile.c
parent52855452711eb2df1900470d387b58dede3ac941 (diff)
parent3c317e76a2fe78896b546e08fa753075463e7d41 (diff)
downloadcpython-cf2ad555113e4afc6f8cd5ac5235deef6a3fdf82.zip
cpython-cf2ad555113e4afc6f8cd5ac5235deef6a3fdf82.tar.gz
cpython-cf2ad555113e4afc6f8cd5ac5235deef6a3fdf82.tar.bz2
Issue #27286: Fixed compiling BUILD_MAP_UNPACK_WITH_CALL opcode. Calling
function with generalized unpacking (PEP 448) and conflicting keyword names could cause undefined behavior.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 2d59d38..485fdd7 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3487,7 +3487,7 @@ compiler_call_helper(struct compiler *c,
code |= 2;
if (nsubkwargs > 1) {
/* Pack it all up */
- int function_pos = n + (code & 1) + nkw + 1;
+ int function_pos = n + (code & 1) + 2 * nkw + 1;
ADDOP_I(c, BUILD_MAP_UNPACK_WITH_CALL, nsubkwargs | (function_pos << 8));
}
}