Fix an venerable bug: if we're reducing a rule that has an empty
authorotto <otto@openbsd.org>
Tue, 8 Jul 2008 15:06:50 +0000 (15:06 +0000)
committerotto <otto@openbsd.org>
Tue, 8 Jul 2008 15:06:50 +0000 (15:06 +0000)
commit539ddd41d4432ce65f3ea79459c50c8a876a0ea7
tree81c700933af90f5459b8ade79c11fcb849a4db5f
parent98e33d7c059601bad499515a0a9fa4db0270e522
Fix an venerable bug: if we're reducing a rule that has an empty
right hand side and the yacc stackpointer is pointing at the very
end of the allocated stack, we end up accessing the stack out of
bounds by the implicit $$ = $1 action.  Detected by my new malloc,
experienced by sturm@ on sparc64; ok deraadt@
usr.bin/yacc/skeleton.c