diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2011-05-20 16:06:26 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2011-05-20 16:06:26 +0000 |
commit | 0c54bad907045bce1db066767f106fa1a1334fe7 (patch) | |
tree | 849d8cb929fb312337b800b65e1214c09d89f38e | |
parent | 8cd2d50276ae8eff6300ac59d0f47b7bed07b872 (diff) |
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.c | 5 |
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); |