diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-09-01 03:00:38 +0200 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2010-09-01 03:00:38 +0200 |
commit | 10cea94582148cd5bcccfa2723247332e1743303 (patch) | |
tree | 56cfc7866bbabe854d914f7d9b8bd980d976124a /perlio.c | |
parent | 6999193ba9069e620831bed0f85efa43ff6e283a (diff) | |
download | perl-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 */ |