summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/msgrcv.c
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-07-27 06:25:28 +0000
committerGreg McGary <greg@mcgary.org>2000-07-27 06:25:28 +0000
commitd25c879dc55dcc6a477fdce1c75382afec7596b8 (patch)
tree623e432d69fb742e511a258889ca3f4bfaf113e0 /sysdeps/unix/sysv/linux/msgrcv.c
parent4362aba591b7f7dd67abdb37478a4dd8393b5253 (diff)
* sysdeps/gnu/bits/msq.h: Qualify kernel's
data structure pointers as __unbounded. * sysdeps/unix/sysv/linux/mips/bits/shm.h: Likewise. * sysdeps/generic/bp-semctl.h: New file. * sysdeps/unix/sysv/linux/msgctl.c: Qualify kernel's data structure pointers as __unbounded. Check bounds of syscall args. * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. * sysdeps/unix/sysv/linux/semctl.c: Likewise. * sysdeps/unix/sysv/linux/semop.c: Likewise. * sysdeps/unix/sysv/linux/shmat.c: Likewise. * sysdeps/unix/sysv/linux/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/shmdt.c: Likewise. * sysdeps/unix/sysv/linux/alpha/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/alpha/semctl.c: Likewise. * sysdeps/unix/sysv/linux/alpha/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/semctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/shmctl.c: Likewise. 2000-07-26 Greg McGary <greg@mcgary.org> * sysdeps/gnu/bits/msq.h: Qualify kernel's data structure pointers as __unbounded. * sysdeps/unix/sysv/linux/mips/bits/shm.h: Likewise. * sysdeps/generic/bp-semctl.h: New file. * sysdeps/unix/sysv/linux/msgctl.c: Qualify kernel's data structure pointers as __unbounded. Check bounds of syscall args. * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. * sysdeps/unix/sysv/linux/semctl.c: Likewise. * sysdeps/unix/sysv/linux/semop.c: Likewise. * sysdeps/unix/sysv/linux/shmat.c: Likewise. * sysdeps/unix/sysv/linux/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/shmdt.c: Likewise. * sysdeps/unix/sysv/linux/alpha/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/alpha/semctl.c: Likewise. * sysdeps/unix/sysv/linux/alpha/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/semctl.c: Likewise. * sysdeps/unix/sysv/linux/i386/shmctl.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/msgctl.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/shmctl.c: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/msgrcv.c')
-rw-r--r--sysdeps/unix/sysv/linux/msgrcv.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/msgrcv.c b/sysdeps/unix/sysv/linux/msgrcv.c
index d0da0d6394..0971143111 100644
--- a/sysdeps/unix/sysv/linux/msgrcv.c
+++ b/sysdeps/unix/sysv/linux/msgrcv.c
@@ -24,12 +24,13 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
/* Kludge to work around Linux' restriction of only up to five
arguments to a system call. */
struct ipc_kludge
{
- void *msgp;
+ void *__unbounded msgp;
long int msgtyp;
};
@@ -46,8 +47,8 @@ msgrcv (msqid, msgp, msgsz, msgtyp, msgflg)
fives parameters to a system call. */
struct ipc_kludge tmp;
- tmp.msgp = msgp;
+ tmp.msgp = CHECK_N (msgp, msgsz);
tmp.msgtyp = msgtyp;
- return INLINE_SYSCALL (ipc, 5, IPCOP_msgrcv, msqid, msgsz, msgflg, &tmp);
+ return INLINE_SYSCALL (ipc, 5, IPCOP_msgrcv, msqid, msgsz, msgflg, __ptrvalue (&tmp));
}