This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #37694] segfault with PerlIO::get_layers()
authorPeter Dintelmann <Peter.Dintelmann@Dresdner-Bank.com>
Wed, 16 Nov 2005 07:11:41 +0000 (23:11 -0800)
committerSteve Peters <steve@fisharerojo.org>
Thu, 17 Nov 2005 00:18:31 +0000 (00:18 +0000)
From: Peter Dintelmann (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.0.11-37694-124556.15.9755707729767@perl.org>

p4raw-id: //depot/perl@26144

universal.c

index 1f63563..10dddb5 100644 (file)
@@ -850,7 +850,7 @@ XS(XS_PerlIO_get_layers)
        if (!isGV(sv)) {
             if (SvROK(sv) && isGV(SvRV(sv)))
                  gv = (GV*)SvRV(sv);
-            else
+            else if (SvPOKp(sv))
                  gv = gv_fetchsv(sv, FALSE, SVt_PVIO);
        }