diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2004-09-01 22:17:47 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2004-09-01 22:17:47 +0000 |
commit | 24c897388d7b9ce07248cecb5920b9fbd4ac27ba (patch) | |
tree | 632dcbda065a40f7ec33a344d6797421ef38f196 /pp_ctl.c | |
parent | fd1abbef24b103836b91c31da66323dac8ca6b23 (diff) | |
download | perl-24c897388d7b9ce07248cecb5920b9fbd4ac27ba.tar.gz |
[perl #31111] Random made scripts crashing perl
fix 'formline undef' coredump
p4raw-id: //depot/perl@23251
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -379,7 +379,8 @@ PP(pp_formline) NV value; bool gotsome = FALSE; STRLEN len; - STRLEN fudge = SvCUR(tmpForm) * (IN_BYTES ? 1 : 3) + 1; + STRLEN fudge = SvPOK(tmpForm) + ? (SvCUR(tmpForm) * (IN_BYTES ? 1 : 3) + 1) : 0; bool item_is_utf8 = FALSE; bool targ_is_utf8 = FALSE; SV * nsv = Nullsv; @@ -387,6 +388,8 @@ PP(pp_formline) char *fmt; bool oneline; + + if (!SvMAGICAL(tmpForm) || !SvCOMPILED(tmpForm)) { if (SvREADONLY(tmpForm)) { SvREADONLY_off(tmpForm); |