This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_mode_from_discipline must update len. (else SEGV)
authorNicholas Clark <nick@ccl4.org>
Sat, 10 Jul 2004 16:00:44 +0000 (16:00 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 10 Jul 2004 16:00:44 +0000 (16:00 +0000)
Diagnosis and patch from clkao

p4raw-id: //depot/perl@23076

doio.c

diff --git a/doio.c b/doio.c
index 98e7204..a551d05 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1172,6 +1172,7 @@ fail_discipline:
 #ifndef PERLIO_LAYERS
                Perl_croak(aTHX_ "IO layers (like '%.*s') unavailable", end-s, s);
 #else
+               len -= end-s;
                s = end;
 #endif
            }