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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to