diff options
author | Zefram <zefram@fysh.org> | 2017-11-13 07:45:35 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-11-13 07:45:35 +0000 |
commit | e8b20b1238fb2bfcdc6d131e979cbd6c1dbd4b71 (patch) | |
tree | 7cd5cdabfa8ddfdb0872efd42c3377d1c2c83856 /sv.c | |
parent | f63f40368cca0cfffd2773a6206d1ab3235b61b3 (diff) | |
download | perl-e8b20b1238fb2bfcdc6d131e979cbd6c1dbd4b71.tar.gz |
duplicate full index for SAVEt_AELEM
The index in a SAVEt_AELEM save entry is now IV-sized, but only an I32
portion of it was being duplicated. This would lead to restoring the
wrong element if a pseudfork were done with a localised array element
on the stack, if the array index were above the 32-bit range or on a
big-endian architecture.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -14974,8 +14974,8 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param) case SAVEt_AELEM: /* array element */ sv = (const SV *)POPPTR(ss,ix); TOPPTR(nss,ix) = SvREFCNT_inc(sv_dup_inc(sv, param)); - i = POPINT(ss,ix); - TOPINT(nss,ix) = i; + iv = POPIV(ss,ix); + TOPIV(nss,ix) = iv; av = (const AV *)POPPTR(ss,ix); TOPPTR(nss,ix) = av_dup_inc(av, param); break; |