1
0
mirror of https://github.com/golang/go synced 2024-09-25 07:20:12 -06:00

fix bounds check in error recovery

(thanks to avp@mit.edu)

R=rsc
CC=golang-dev
https://golang.org/cl/1998041
This commit is contained in:
Ken Thompson 2010-08-13 14:30:18 -07:00
parent 1f9dfa294f
commit 3efb4c3b63

View File

@ -3244,7 +3244,7 @@ yydefault:
Errflag = 3
/* find a state where "error" is a legal shift action */
for yyp >= len(YYS) {
for yyp >= 0 {
yyn = yyPact[YYS[yyp].yys] + yyErrCode
if yyn >= 0 && yyn < yyLast {
yystate = yyAct[yyn] /* simulate a shift of "error" */