From 3c317e76a2fe78896b546e08fa753075463e7d41 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 12 Jun 2016 09:22:01 +0300 Subject: 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. --- Python/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 1e720eab0d..0c4a6c853f 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -3262,7 +3262,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)); } } -- cgit v1.2.1