diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-06-12 09:35:13 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-06-12 09:35:13 +0300 |
commit | a1aa6bca995d8532b6cecfb29e4145cb08403fda (patch) | |
tree | 99625c87b8e2ab2fe312dc7bc41aac73211d73ca /Python/compile.c | |
parent | 826aa8295c78524fd810e0d7f87c8f13dc15b410 (diff) | |
parent | 657ccfb66a6830b2f54743c60fd11bb210905f06 (diff) | |
download | cpython-a1aa6bca995d8532b6cecfb29e4145cb08403fda.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c index 2d59d38037..485fdd7a28 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)); } } |