svn commit: r336492 - head/contrib/netbsd-tests/lib/libc/sys

Andrew Turner andrew at FreeBSD.org
Thu Jul 19 17:13:47 UTC 2018


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);


More information about the svn-src-head mailing list