rc: avoid single-byte overflow in lexer
[rsc] --rw-rw-r-- M 467740 glenda sys 6102 Mar 12 09:15 sys/src/cmd/rc/lex.c
/n/sourcesdump/2006/0312/plan9/sys/src/cmd/rc/lex.c:149,155 -
/n/sourcesdump/2006/0313/plan9/sys/src/cmd/rc/lex.c:149,155
{
if(p==0)
return 0;
- if(p==&tok[NTOK]){
+ if(p==&tok[NTOK-1]){
*p = 0;
yyerror("token buffer too short");
return 0;
|