Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/net/lib/libsockin fix off-by-one in sanity check an...



details:   https://anonhg.NetBSD.org/src/rev/bc5efb62bf8f
branches:  trunk
changeset: 748224:bc5efb62bf8f
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat Oct 17 20:35:52 2009 +0000

description:
fix off-by-one in sanity check and bump lazy bum magic value

diffstat:

 sys/rump/net/lib/libsockin/sockin.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 930cd2695404 -r bc5efb62bf8f sys/rump/net/lib/libsockin/sockin.c
--- a/sys/rump/net/lib/libsockin/sockin.c       Sat Oct 17 20:03:06 2009 +0000
+++ b/sys/rump/net/lib/libsockin/sockin.c       Sat Oct 17 20:35:52 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sockin.c,v 1.17 2009/10/16 23:17:46 pooka Exp $        */
+/*     $NetBSD: sockin.c,v 1.18 2009/10/17 20:35:52 pooka Exp $        */
 
 /*
  * Copyright (c) 2008, 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.17 2009/10/16 23:17:46 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.18 2009/10/17 20:35:52 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/condvar.h>
@@ -407,7 +407,7 @@
        {
                struct sockaddr *saddr;
                struct msghdr mhdr;
-               struct iovec iov[16];
+               struct iovec iov[32];
                struct mbuf *m2;
                size_t tot;
                int i, s;
@@ -416,7 +416,7 @@
 
                tot = 0;
                for (i = 0, m2 = m; m2; m2 = m2->m_next, i++) {
-                       if (i > 16)
+                       if (i >= 32)
                                panic("lazy bum");
                        iov[i].iov_base = m2->m_data;
                        iov[i].iov_len = m2->m_len;



Home | Main Index | Thread Index | Old Index