diff options
author | Vincent Pit <perl@profvince.com> | 2015-10-01 12:28:51 -0300 |
---|---|---|
committer | Vincent Pit <perl@profvince.com> | 2015-10-05 14:11:50 -0300 |
commit | bcb10b843c9a2ef1ebc19a02f363cd3b135af809 (patch) | |
tree | 39cb41bea26e397bc840e1ff5e7e0d148cf645d7 /pp.c | |
parent | eac6cd3140255ff15798c196f32e6cfd3b2957b7 (diff) | |
download | perl-bcb10b843c9a2ef1ebc19a02f363cd3b135af809.tar.gz |
Future-proof pp_trans against a possible future undefined behaviour
If do_trans() ever wants to modify the stack in the future, this would
cause an undefined behaviour as mPUSHi() invokes its parameter on the same
argument list as PUSHmortal, which itself touches the stack.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -762,7 +762,8 @@ PP(pp_trans) PUSHs(newsv); } else { - mPUSHi(do_trans(sv)); + I32 i = do_trans(sv); + mPUSHi(i); } RETURN; } |