summaryrefslogtreecommitdiffstats
path: root/sys/kern/sysv_msg.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-09-19 22:59:22 +0000
committerpeter <peter@FreeBSD.org>2000-09-19 22:59:22 +0000
commite603b28167dfe5c5f14d5e176f8c5613ca89f046 (patch)
treee142eb2a115e8365c81862e3a7d62f1d86f20082 /sys/kern/sysv_msg.c
parentfe1b76bd4420b59115d7cf400d87d714587ab64d (diff)
downloadFreeBSD-src-e603b28167dfe5c5f14d5e176f8c5613ca89f046.zip
FreeBSD-src-e603b28167dfe5c5f14d5e176f8c5613ca89f046.tar.gz
Fully initialize msqids[]. This could lead to ENOSPC and other strange
stuff. PR: 21085 Submitted by: Marcin Cieslak <saper@SYSTEM.PL>
Diffstat (limited to 'sys/kern/sysv_msg.c')
-rw-r--r--sys/kern/sysv_msg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index aa84283..ff4729e 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -188,6 +188,7 @@ msginit(dummy)
for (i = 0; i < msginfo.msgmni; i++) {
msqids[i].msg_qbytes = 0; /* implies entry is available */
msqids[i].msg_perm.seq = 0; /* reset to a known value */
+ msqids[i].msg_perm.mode = 0;
}
}
SYSINIT(sysv_msg, SI_SUB_SYSV_MSG, SI_ORDER_FIRST, msginit, NULL)
OpenPOWER on IntegriCloud