summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblambert <blambert@openbsd.org>2011-05-20 16:06:25 +0000
committerblambert <blambert@openbsd.org>2011-05-20 16:06:25 +0000
commit5187f3f0de4f76ca4142b380ff6580df02b1ae58 (patch)
tree3ecafd01651837090a2eda8d3d6dc03c15e807fd
parentfix copy and paste in BIOCINSTALLBOOT ioctl number. (diff)
downloadwireguard-openbsd-5187f3f0de4f76ca4142b380ff6580df02b1ae58.tar.xz
wireguard-openbsd-5187f3f0de4f76ca4142b380ff6580df02b1ae58.zip
Avoid panic'ing on a bad pointer passed in by callers of msgsnd;
uiomove() will do the right thing in that case. "This fix is right" kettenis@
-rw-r--r--sys/kern/sysv_msg.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index cccdfeddc0d..a2d0da4f89c 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysv_msg.c,v 1.23 2010/01/14 23:12:11 schwarze Exp $ */
+/* $OpenBSD: sysv_msg.c,v 1.24 2011/05/20 16:06:25 blambert Exp $ */
/* $NetBSD: sysv_msg.c,v 1.19 1996/02/09 19:00:18 christos Exp $ */
/*
* Copyright (c) 2009 Bret S. Lambert <blambert@openbsd.org>
@@ -251,9 +251,6 @@ sys_msgsnd(struct proc *p, void *v, register_t *retval)
size_t msgsz = SCARG(uap, msgsz);
int error;
- if (SCARG(uap, msgp) == NULL)
- panic("NULL userbuffer");
-
if ((que = que_lookup(SCARG(uap, msqid))) == NULL)
return (EINVAL);