Change 22181 by [EMAIL PROTECTED] on 2004/01/19 23:41:37

        change #22071 (taint bug in $^0) introduced a potential double
        free(), because PL_osname may get freed but not nulled if a taint
        test fails in between. Mea cupla and all that...

Affected files ...

... //depot/perl/mg.c#293 edit

Differences ...

==== //depot/perl/mg.c#293 (text) ====
Index: perl/mg.c
--- perl/mg.c#292~22071~        Mon Jan  5 14:17:04 2004
+++ perl/mg.c   Mon Jan 19 15:41:37 2004
@@ -2091,14 +2091,14 @@
        break;
     case '\017':       /* ^O */
        if (*(mg->mg_ptr+1) == '\0') {
-           if (PL_osname)
+           if (PL_osname) {
                Safefree(PL_osname);
+               PL_osname = Nullch;
+           }
            if (SvOK(sv)) {
                TAINT_PROPER("assigning to $^O");
                PL_osname = savepv(SvPV(sv,len));
            }
-           else
-               PL_osname = Nullch;
        }
        else if (strEQ(mg->mg_ptr, "\017PEN")) {
            if (!PL_compiling.cop_io)
End of Patch.

Reply via email to