Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Nov 2016 20:11:55 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r309217 - head/usr.bin/indent
Message-ID:  <201611272011.uARKBtdP067212@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611272011.uARKBtdP067212>