summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorPeter Dintelmann <Peter.Dintelmann@Dresdner-Bank.com>2005-11-10 22:36:20 -0800
committerSteve Peters <steve@fisharerojo.org>2005-11-12 19:46:18 +0000
commit68b5363f7e6243d999097c647e922642ab157ba3 (patch)
tree1289290ad195775f7f18e2298d9ee7be6685b348 /perlio.c
parent28380c63cd9173f18880af861b13577e75427568 (diff)
downloadperl-68b5363f7e6243d999097c647e922642ab157ba3.tar.gz
[perl #37657] segfault with binmode ":pop"
From: Peter Dintelmann (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.0.11-37657-124293.6.03947871136576@perl.org> p4raw-id: //depot/perl@26101
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/perlio.c b/perlio.c
index 051c67ff35..5e1b85502a 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1296,9 +1296,10 @@ PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode, const char *names)
int
PerlIO_binmode(pTHX_ PerlIO *f, int iotype, int mode, const char *names)
{
- PerlIO_debug("PerlIO_binmode f=%p %s %c %x %s\n",
- (void*)f, PerlIOBase(f)->tab->name, iotype, mode,
- (names) ? names : "(Null)");
+ PerlIO_debug("PerlIO_binmode f=%p %s %c %x %s\n", (void*)f,
+ (PerlIOBase(f)) ? PerlIOBase(f)->tab->name : "(Null)",
+ iotype, mode, (names) ? names : "(Null)");
+
if (names) {
/* Do not flush etc. if (e.g.) switching encodings.
if a pushed layer knows it needs to flush lower layers