Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Oct 2014 23:08:01 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272971 - head/usr.sbin/rtadvd
Message-ID:  <201410112308.s9BN81W5046122@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Sat Oct 11 23:08:00 2014
New Revision: 272971
URL: https://svnweb.freebsd.org/changeset/base/272971

Log:
  Fix off-by-one.
  
  MFC after:	1 day

Modified:
  head/usr.sbin/rtadvd/advcap.c

Modified: head/usr.sbin/rtadvd/advcap.c
==============================================================================
--- head/usr.sbin/rtadvd/advcap.c	Sat Oct 11 23:02:03 2014	(r272970)
+++ head/usr.sbin/rtadvd/advcap.c	Sat Oct 11 23:08:00 2014	(r272971)
@@ -149,9 +149,9 @@ getent(char *bp, char *name, const char 
 				}
 				break;
 			}
-			if (cp >= bp + BUFSIZ) {
+			if (cp >= bp + BUFSIZ - 1) {
 				write(STDERR_FILENO, "Remcap entry too long\n",
-				      23);
+				    22);
 				break;
 			} else
 				*cp++ = c;



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