Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet make assumption on mbuf explicit (m->m_len >= si...
details: https://anonhg.NetBSD.org/src/rev/c3bee5b047bd
branches: trunk
changeset: 482130:c3bee5b047bd
user: itojun <itojun%NetBSD.org@localhost>
date: Tue Feb 15 00:42:22 2000 +0000
description:
make assumption on mbuf explicit (m->m_len >= sizeof (struct ip)).
diffstat:
sys/netinet/in4_cksum.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (20 lines):
diff -r 08f14006aab9 -r c3bee5b047bd sys/netinet/in4_cksum.c
--- a/sys/netinet/in4_cksum.c Tue Feb 15 00:31:08 2000 +0000
+++ b/sys/netinet/in4_cksum.c Tue Feb 15 00:42:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in4_cksum.c,v 1.2 1999/12/13 15:17:19 itojun Exp $ */
+/* $NetBSD: in4_cksum.c,v 1.3 2000/02/15 00:42:22 itojun Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@@ -111,7 +111,9 @@
/* pseudo header */
if (off < sizeof(struct ipovly))
- panic("offset too short");
+ panic("in4_cksum: offset too short");
+ if (m->m_len < sizeof(struct ip))
+ panic("in4_cksum: bad mbuf chain");
bzero(&ipov, sizeof(ipov));
ipov.ih_len = htons(len);
ipov.ih_pr = nxt;
Home |
Main Index |
Thread Index |
Old Index