summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-10 00:56:27 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-10 00:56:27 +0000
commit445b3f5100bf9bd5899b8cc5eed925e1cf28b5b2 (patch)
tree45125744e1f40f1dd45ced537a4ed38b83e08b2c /pp_ctl.c
parent0ea24a45c99c9fd1365aeec509bea7218409d1a1 (diff)
downloadperl-445b3f5100bf9bd5899b8cc5eed925e1cf28b5b2.tar.gz
formline() could wipe out readonly-ness, freeing constants
prematurely, or affect cloning of pad constants p4raw-id: //depot/perl@5056
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 972c21d30c..7b4cbfea49 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -302,8 +302,13 @@ PP(pp_formline)
bool item_is_utf = FALSE;
if (!SvMAGICAL(tmpForm) || !SvCOMPILED(tmpForm)) {
- SvREADONLY_off(tmpForm);
- doparseform(tmpForm);
+ if (SvREADONLY(tmpForm)) {
+ SvREADONLY_off(tmpForm);
+ doparseform(tmpForm);
+ SvREADONLY_on(tmpForm);
+ }
+ else
+ doparseform(tmpForm);
}
SvPV_force(PL_formtarget, len);