Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6-0]: src/sys/compat/osf1 Pull up following revision(s) (requeste...



details:   https://anonhg.NetBSD.org/src/rev/30673f2f0345
branches:  netbsd-6-0
changeset: 775098:30673f2f0345
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Nov 15 20:48:44 2015 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #1338):
        sys/compat/osf1/osf1_socket.c: revision 1.21
easy kmem_alloc(0)
ok shm@

diffstat:

 sys/compat/osf1/osf1_socket.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 0cc723a75516 -r 30673f2f0345 sys/compat/osf1/osf1_socket.c
--- a/sys/compat/osf1/osf1_socket.c     Sun Nov 15 20:44:10 2015 +0000
+++ b/sys/compat/osf1/osf1_socket.c     Sun Nov 15 20:48:44 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_socket.c,v 1.20 2010/04/23 15:19:21 rmind Exp $ */
+/* $NetBSD: osf1_socket.c,v 1.20.20.1 2015/11/15 20:48:44 bouyer Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osf1_socket.c,v 1.20 2010/04/23 15:19:21 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_socket.c,v 1.20.20.1 2015/11/15 20:48:44 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -116,7 +116,7 @@
                return (EINVAL);
 
        iov_len = bsd_msghdr.msg_iovlen;
-       if (iov_len > IOV_MAX)
+       if ((iov_len > IOV_MAX) || (iov_len == 0))
                return EMSGSIZE;
        bsd_iovec = kmem_alloc(iov_len * sizeof(struct iovec), KM_SLEEP);
        bsd_msghdr.msg_iov = bsd_iovec;



Home | Main Index | Thread Index | Old Index