Avoid undefined behavior that accessed just before the start of an array.

* src/reader.c (packgram): Prepend a new sentinel before ritem.
* src/lalr.c (build_relations): Rely on new sentinel.
* src/gram.c (gram_free): Adjust to new sentinel.
This commit is contained in:
Paul Eggert
2006-01-18 23:48:29 +00:00
parent 02d7cce6e2
commit e9ad4aeca5
4 changed files with 24 additions and 9 deletions

View File

@@ -1,3 +1,11 @@
2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
Avoid undefined behavior that accessed just before the start of an
array. Problem reported by twlevo.
* src/reader.c (packgram): Prepend a new sentinel before ritem.
* src/lalr.c (build_relations): Rely on new sentinel.
* src/gram.c (gram_free): Adjust to new sentinel.
2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
* data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to