Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Cast to int, to properly handle dstoff...
details: https://anonhg.NetBSD.org/src/rev/3ee07af59228
branches: trunk
changeset: 318380:3ee07af59228
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Apr 20 06:01:59 2018 +0000
description:
Cast to int, to properly handle dstoff > MHLEN (which never happens).
diffstat:
sys/kern/uipc_mbuf.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 23adbe65fd57 -r 3ee07af59228 sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c Fri Apr 20 03:03:13 2018 +0000
+++ b/sys/kern/uipc_mbuf.c Fri Apr 20 06:01:59 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_mbuf.c,v 1.192 2018/04/19 05:16:02 maxv Exp $ */
+/* $NetBSD: uipc_mbuf.c,v 1.193 2018/04/20 06:01:59 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.192 2018/04/19 05:16:02 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.193 2018/04/20 06:01:59 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_mbuftrace.h"
@@ -1112,7 +1112,7 @@
int count, space;
KASSERT(len != M_COPYALL);
- if (len > (MHLEN - dstoff))
+ if (len > ((int)MHLEN - dstoff))
goto bad;
m = m_get(M_DONTWAIT, n->m_type);
if (m == NULL)
Home |
Main Index |
Thread Index |
Old Index