diff options
author | Tony Cook <tony@develop-help.com> | 2015-04-14 15:59:03 +1000 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2015-08-10 08:41:30 +0100 |
commit | 4db4d6727189105b033a1a4be009711535cd7407 (patch) | |
tree | ddbd1aedd8594c319b3d4b1fc4f040429eb019ce /sv.c | |
parent | 6410499c3576275d529c1c5db34622340e6531ef (diff) | |
download | perl-4db4d6727189105b033a1a4be009711535cd7407.tar.gz |
[perl #124127] fix cloning arrays with unused elements
ce0d59fd changed arrays to use NULL instead of &PL_sv_undef for
unused elements, unfortunately it missed updating sv_dup_common()'s
initialization of unused elements, leaving them as &PL_sv_undef.
This resulted in modification of read only value errors at runtime.
(cherry picked from commit 902d16915db2735c3a41f15ef8d95cf300c31801)
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -12698,7 +12698,7 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) } items = AvMAX((const AV *)sstr) - AvFILLp((const AV *)sstr); while (items-- > 0) { - *dst_ary++ = &PL_sv_undef; + *dst_ary++ = NULL; } } else { |