Change 18579 by ams@lustre on 2003/01/26 02:50:44

        Subject: Re: [perl #20408] SV's SvPVX get freed even when its SvLEN is zero
        From: Enache Adrian <[EMAIL PROTECTED]>
        Date: Sun, 26 Jan 2003 04:55:48 +0200
        Message-Id: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/pp_ctl.c#336 edit

Differences ...

==== //depot/perl/pp_ctl.c#336 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#335~18528~    Mon Jan 20 16:24:11 2003
+++ perl/pp_ctl.c       Sat Jan 25 18:50:44 2003
@@ -182,7 +182,8 @@
            cx->sb_rxtainted |= RX_MATCH_TAINTED(rx);
 
            (void)SvOOK_off(targ);
-           Safefree(SvPVX(targ));
+           if (SvLEN(targ))
+               Safefree(SvPVX(targ));
            SvPVX(targ) = SvPVX(dstr);
            SvCUR_set(targ, SvCUR(dstr));
            SvLEN_set(targ, SvLEN(dstr));
End of Patch.

Reply via email to