svn commit: r316180 - head/contrib/netbsd-tests/lib/libc/sys
Conrad Meyer
cem at FreeBSD.org
Wed Mar 29 21:29:22 UTC 2017
Author: cem
Date: Wed Mar 29 21:29:21 2017
New Revision: 316180
URL: https://svnweb.freebsd.org/changeset/base/316180
Log:
Follow-up to r316179: More of the same
Reported by: Coverity
CIDs: 1368705, 1368706, 1368707, 1368710
Sponsored by: Dell EMC Isilon
Modified:
head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c
Modified: head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c Wed Mar 29 21:26:13 2017 (r316179)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c Wed Mar 29 21:29:21 2017 (r316180)
@@ -98,7 +98,7 @@ ATF_TC_BODY(msgsnd_block, tc)
*/
for (;;) {
- if (msgsnd(id, &msg, sizeof(struct msg), 0) < 0)
+ if (msgsnd(id, &msg, sizeof(msg.buf), 0) < 0)
_exit(EXIT_FAILURE);
}
}
@@ -140,7 +140,7 @@ ATF_TC_BODY(msgsnd_count, tc)
for (;;) {
errno = 0;
- rv = msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT);
+ rv = msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT);
if (rv == 0) {
i++;
@@ -184,12 +184,12 @@ ATF_TC_BODY(msgsnd_err, tc)
errno = 0;
ATF_REQUIRE_ERRNO(EFAULT, msgsnd(id, (void *)-1,
- sizeof(struct msg), IPC_NOWAIT) == -1);
+ sizeof(msg.buf), IPC_NOWAIT) == -1);
errno = 0;
ATF_REQUIRE_ERRNO(EINVAL, msgsnd(-1, &msg,
- sizeof(struct msg), IPC_NOWAIT) == -1);
+ sizeof(msg.buf), IPC_NOWAIT) == -1);
errno = 0;
@@ -200,7 +200,7 @@ ATF_TC_BODY(msgsnd_err, tc)
msg.mtype = 0;
ATF_REQUIRE_ERRNO(EINVAL, msgsnd(id, &msg,
- sizeof(struct msg), IPC_NOWAIT) == -1);
+ sizeof(msg.buf), IPC_NOWAIT) == -1);
ATF_REQUIRE(msgctl(id, IPC_RMID, 0) == 0);
}
@@ -299,7 +299,7 @@ ATF_TC_BODY(msgsnd_perm, tc)
errno = 0;
- if (msgsnd(id, &msg, sizeof(struct msg), IPC_NOWAIT) == 0)
+ if (msgsnd(id, &msg, sizeof(msg.buf), IPC_NOWAIT) == 0)
_exit(EXIT_FAILURE);
if (errno != EACCES)
More information about the svn-src-all
mailing list