Source-Changes-HG archive

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

[src/trunk]: src/sys/kern The mbuf length is allowed to be zero.



details:   https://anonhg.NetBSD.org/src/rev/d465c8e2a1b1
branches:  trunk
changeset: 318361:d465c8e2a1b1
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Apr 19 05:16:02 2018 +0000
description:
The mbuf length is allowed to be zero.

diffstat:

 sys/kern/uipc_mbuf.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r f92b9003e6e3 -r d465c8e2a1b1 sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c      Wed Apr 18 17:58:07 2018 +0000
+++ b/sys/kern/uipc_mbuf.c      Thu Apr 19 05:16:02 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_mbuf.c,v 1.191 2018/04/17 07:58:31 maxv Exp $     */
+/*     $NetBSD: uipc_mbuf.c,v 1.192 2018/04/19 05:16:02 maxv Exp $     */
 
 /*
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.191 2018/04/17 07:58:31 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.192 2018/04/19 05:16:02 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mbuftrace.h"
@@ -1940,7 +1940,7 @@
                        low = n->m_dat;
                        high = low + MLEN;
                }
-               if (__predict_false(dat + len <= dat)) {
+               if (__predict_false(dat + len < dat)) {
                        panic("%s: incorrect length (len = %d)", __func__, len);
                }
                if (__predict_false((dat < low) || (dat + len > high))) {



Home | Main Index | Thread Index | Old Index