summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-09-01 03:00:38 +0200
committerFlorian Ragwitz <rafl@debian.org>2010-09-01 03:00:38 +0200
commit10cea94582148cd5bcccfa2723247332e1743303 (patch)
tree56cfc7866bbabe854d914f7d9b8bd980d976124a /perlio.c
parent6999193ba9069e620831bed0f85efa43ff6e283a (diff)
downloadperl-10cea94582148cd5bcccfa2723247332e1743303.tar.gz
[perl #77492] open $fh, ">", \*glob causes SEGV
PerlIO_layer_from_ref must not treat a real glob as a scalar. This function was not updated when SVt_PVGV was moved before SVt_PVLV.
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/perlio.c b/perlio.c
index 5df704e54a..c83b2bb58e 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1449,7 +1449,7 @@ PerlIO_layer_from_ref(pTHX_ SV *sv)
/*
* For any scalar type load the handler which is bundled with perl
*/
- if (SvTYPE(sv) < SVt_PVAV) {
+ if (SvTYPE(sv) < SVt_PVAV && !isGV_with_GP(sv)) {
PerlIO_funcs *f = PerlIO_find_layer(aTHX_ STR_WITH_LEN("scalar"), 1);
/* This isn't supposed to happen, since PerlIO::scalar is core,
* but could happen anyway in smaller installs or with PAR */