svn commit: r309217 - head/usr.bin/indent

Pedro F. Giffuni pfg at FreeBSD.org
Sun Nov 27 20:11:56 UTC 2016


Author: pfg
Date: Sun Nov 27 20:11:55 2016
New Revision: 309217
URL: https://svnweb.freebsd.org/changeset/base/309217

Log:
  indent(1): minor off-by-one error.
  
  This was introduced in r303571.
  
  Obtianed from:	Piotr Stefaniak

Modified:
  head/usr.bin/indent/parse.c

Modified: head/usr.bin/indent/parse.c
==============================================================================
--- head/usr.bin/indent/parse.c	Sun Nov 27 19:27:13 2016	(r309216)
+++ head/usr.bin/indent/parse.c	Sun Nov 27 20:11:55 2016	(r309217)
@@ -202,7 +202,7 @@ parse(int tk) /* tk: the code for the co
 
     }				/* end of switch */
 
-    if (ps.tos >= STACKSIZE)
+    if (ps.tos >= STACKSIZE - 1)
 	errx(1, "Parser stack overflow");
 
     reduce();			/* see if any reduction can be done */


More information about the svn-src-all mailing list