cmd/yacc: do not create an out of bounds pointer
An out of bounds pointer/array index being created is an error in standard C. Updates #313 Change-Id: I7108fcde1a8e03017e9ab852adb737940489c827
This commit is contained in:
parent
7ba9f9467d
commit
4a3f20bcee
@ -2819,8 +2819,9 @@ stin(int i)
|
||||
for(n = -maxoff; n < ACTSIZE; n++) {
|
||||
flag = 0;
|
||||
for(r = q1; r < q2; r += 2) {
|
||||
if((s = *r + n + amem) < amem)
|
||||
if(*r + n < 0)
|
||||
goto nextn;
|
||||
s = *r + n + amem;
|
||||
if(*s == 0)
|
||||
flag++;
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user