Random input test and Perl
Ilya Zakharevich [Wed, 2 May 2001 14:35:50 +0000 (07:35 -0700)]
Message-Id: <200105022135.OAA26245@fac-813-1.math.Berkeley.EDU>

p4raw-id: //depot/perl@9969

toke.c

diff --git a/toke.c b/toke.c
index 773db31..39b4b24 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -2847,6 +2847,8 @@ Perl_yylex(pTHX)
                s++;
            if (s < d)
                s++;
+           else if (s > d) /* Found by Ilya: feed random input to Perl. */
+               croak("panic: input overflow");
            incline(s);
            if (PL_lex_formbrack && PL_lex_brackets <= PL_lex_formbrack) {
                PL_bufptr = s;