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
This commit is contained in:
Andrew Turner 2018-07-19 17:13:46 +00:00
parent 103cc0f6ea
commit acfbf59013
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336492

View File

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