diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2004-04-27 22:21:35 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2004-04-27 22:21:35 +0000 |
commit | 8f3c2c0cb1ce993e7d37b84cf6256c76fd3a298a (patch) | |
tree | f5e0304d5a88e4c476b6675534f368e3388f63b5 /pp.c | |
parent | ef1087867acdfa0e526203dfb4a3261e28743f6b (diff) | |
download | perl-8f3c2c0cb1ce993e7d37b84cf6256c76fd3a298a.tar.gz |
fix a coredump caused by rv2gv not fully converting a PV to an RV
p4raw-id: //depot/perl@22746
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -168,6 +168,12 @@ PP(pp_rv2gv) } if (SvTYPE(sv) < SVt_RV) sv_upgrade(sv, SVt_RV); + if (SvPVX(sv)) { + (void)SvOOK_off(sv); /* backoff */ + if (SvLEN(sv)) + Safefree(SvPVX(sv)); + SvLEN(sv)=SvCUR(sv)=0; + } SvRV(sv) = (SV*)gv; SvROK_on(sv); SvSETMAGIC(sv); |