Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jul 2018 17:13:46 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r336492 - head/contrib/netbsd-tests/lib/libc/sys
Message-ID:  <201807191713.w6JHDk9V046844@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Thu Jul 19 17:13:46 2018
New Revision: 336492
URL: https://svnweb.freebsd.org/changeset/base/336492

Log:
  Stop writing past the end of the buffer in the msgget_limit test. The value
  in i is already correct to write to the last item in the buf array.
  
  Obtained from:	CheriBSD
  Sponsored by:	DARPA, AFRL

Modified:
  head/contrib/netbsd-tests/lib/libc/sys/t_msgget.c

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_msgget.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_msgget.c	Thu Jul 19 17:01:10 2018	(r336491)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_msgget.c	Thu Jul 19 17:13:46 2018	(r336492)
@@ -223,7 +223,6 @@ ATF_TC_BODY(msgget_limit, tc)
 			goto out;
 	}
 
-	i++;
 	errno = 0;
 
 	buf[i] = msgget(MSG_KEY + i, IPC_CREAT | IPC_EXCL | 0600);



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