diff options
author | Todd C. Miller <Todd.Miller@courtesan.com> | 2005-06-06 23:24:28 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-06-07 08:56:37 +0000 |
commit | 8bcfe651b09b28d6690b643e50dc59a320126f86 (patch) | |
tree | 7aed580523c8d40e176c8fb0ee86923065182c9a /toke.c | |
parent | 862a34c634844bb3ea22e5f44bdaf2e973831a89 (diff) | |
download | perl-8bcfe651b09b28d6690b643e50dc59a320126f86.tar.gz |
[perl #36193] crash in Perl_yyerror due to missing check for NULL
From: "Todd C. Miller" (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.0.11-36193-115243.12.1531563965146@perl.org>
p4raw-id: //depot/perl@24718
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -10674,8 +10674,9 @@ Perl_yyerror(pTHX_ const char *s) if (!yychar || (yychar == ';' && !PL_rsfp)) where = "at EOF"; - else if (PL_bufptr > PL_oldoldbufptr && PL_bufptr - PL_oldoldbufptr < 200 && - PL_oldoldbufptr != PL_oldbufptr && PL_oldbufptr != PL_bufptr) { + else if (PL_oldoldbufptr && PL_bufptr > PL_oldoldbufptr && + PL_bufptr - PL_oldoldbufptr < 200 && PL_oldoldbufptr != PL_oldbufptr && + PL_oldbufptr != PL_bufptr) { /* Only for NetWare: The code below is removed for NetWare because it abends/crashes on NetWare @@ -10690,8 +10691,8 @@ Perl_yyerror(pTHX_ const char *s) context = PL_oldoldbufptr; contlen = PL_bufptr - PL_oldoldbufptr; } - else if (PL_bufptr > PL_oldbufptr && PL_bufptr - PL_oldbufptr < 200 && - PL_oldbufptr != PL_bufptr) { + else if (PL_oldbufptr && PL_bufptr > PL_oldbufptr && + PL_bufptr - PL_oldbufptr < 200 && PL_oldbufptr != PL_bufptr) { /* Only for NetWare: The code below is removed for NetWare because it abends/crashes on NetWare |