Change 24718 by [EMAIL PROTECTED] on 2005/06/07 08:56:37
Subject: [perl #36193] crash in Perl_yyerror due to missing check for
NULL
From: "Todd C. Miller" (via RT) <[EMAIL PROTECTED]>
Date: 6 Jun 2005 23:24:28 -0000
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/toke.c#566 edit
Differences ...
==== //depot/perl/toke.c#566 (text) ====
Index: perl/toke.c
--- perl/toke.c#565~24717~ Tue Jun 7 01:18:59 2005
+++ perl/toke.c Tue Jun 7 01:56:37 2005
@@ -10674,8 +10674,9 @@
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 @@
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
End of Patch.