mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
led to a segmentation fault in GNU Pascal. Problem reported by Waldek Hebisch.
This commit is contained in:
@@ -1190,7 +1190,7 @@ yyexpandGLRStack (yyGLRStack* yystackp)
|
||||
size_t yysize, yynewSize;
|
||||
size_t yyn;
|
||||
yysize = yystackp->yynextFree - yystackp->yyitems;
|
||||
if (YYMAXDEPTH <= yysize)
|
||||
if (YYMAXDEPTH - YYHEADROOM < yysize)
|
||||
yyMemoryExhausted (yystackp);
|
||||
yynewSize = 2*yysize;
|
||||
if (YYMAXDEPTH < yynewSize)
|
||||
|
||||
Reference in New Issue
Block a user