aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2018-07-19 17:13:46 +0000
committerAndrew Turner <andrew@FreeBSD.org>2018-07-19 17:13:46 +0000
commitacfbf5901384e07ff4b54ef1d6a8480eed6e223e (patch)
tree28d1fd108fa2b6a1f84553fb85c64943d2925f37
parent103cc0f6ea5b2e4e559bf017b4fbfaab6d01994b (diff)
downloadsrc-acfbf5901384e07ff4b54ef1d6a8480eed6e223e.tar.gz
src-acfbf5901384e07ff4b54ef1d6a8480eed6e223e.zip
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
Notes
Notes: svn path=/head/; revision=336492
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_msgget.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_msgget.c b/contrib/netbsd-tests/lib/libc/sys/t_msgget.c
index e26cde2ddfe6..2d7e153d3c62 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_msgget.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_msgget.c
@@ -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);