diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2008-12-09 22:07:27 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2008-12-09 22:07:27 +0000 |
commit | c700720a41c7b8635385df906a4e8443d8851779 (patch) | |
tree | a7201eb7145f79824f066b4e3f19ac50b21b17f9 | |
parent | 66de1e3190568b9558d1c6c6d4ec2dc63d72d412 (diff) | |
download | perl-c700720a41c7b8635385df906a4e8443d8851779.tar.gz |
[perl #57944] Incorrect nonnull attribution on Perl_parser_dup
Apply a fix to maint-5.10. The bleed fix (#33283) changed embed.fnc;
we avoid that for maint (bincompat paranoia) and instead make sure
parser_dup is never called with a null proto ptr.
p4raw-id: //depot/maint-5.10/perl@35070
-rw-r--r-- | sv.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -10948,7 +10948,8 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param) break; case SAVEt_PARSER: ptr = POPPTR(ss,ix); - TOPPTR(nss,ix) = parser_dup((const yy_parser*)ptr, param); + TOPPTR(nss,ix) = ptr ? + parser_dup((const yy_parser*)ptr, param) : NULL; break; case SAVEt_PADSV: /* Nothing should be using this any more, post the integration of @@ -11464,7 +11465,8 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_runops = proto_perl->Irunops; - PL_parser = parser_dup(proto_perl->Iparser, param); + PL_parser = proto_perl->Iparser ? + parser_dup(proto_perl->Iparser, param): NULL; PL_subline = proto_perl->Isubline; PL_subname = sv_dup_inc(proto_perl->Isubname, param); |