Change 16166 by ams@lustre on 2002/04/25 19:43:06

           $fh->close(); print $fh "foo" would segfault under -w in
           report_evil_fh() because $fh doesn't have a name.

Affected files ...

.... //depot/perl/util.c#342 edit

Differences ...

==== //depot/perl/util.c#342 (text) ====
Index: perl/util.c
--- perl/util.c.~1~     Thu Apr 25 14:00:05 2002
+++ perl/util.c Thu Apr 25 14:00:05 2002
@@ -3447,7 +3447,8 @@
     if (gv && isGV(gv)) {
        SV *sv = sv_newmortal();
        gv_efullname4(sv, gv, Nullch, FALSE);
-       name = SvPVX(sv);
+        if (SvOK(sv))
+            name = SvPVX(sv);
     }
 
     if (op == OP_phoney_OUTPUT_ONLY || op == OP_phoney_INPUT_ONLY) {
End of Patch.

Reply via email to