Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/netinet6 Pull up revision 1.14 (via patch, requeste...
details: https://anonhg.NetBSD.org/src/rev/bd2482395271
branches: netbsd-1-5
changeset: 490749:bd2482395271
user: he <he%NetBSD.org@localhost>
date: Mon Feb 26 22:12:27 2001 +0000
description:
Pull up revision 1.14 (via patch, requested by itojun):
Correct option parsing during AH checksum computation.
diffstat:
sys/netinet6/ah_output.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (31 lines):
diff -r 78b9b4fcdf5a -r bd2482395271 sys/netinet6/ah_output.c
--- a/sys/netinet6/ah_output.c Mon Feb 26 22:11:42 2001 +0000
+++ b/sys/netinet6/ah_output.c Mon Feb 26 22:12:27 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ah_output.c,v 1.9.2.3 2001/02/26 21:55:45 he Exp $ */
+/* $NetBSD: ah_output.c,v 1.9.2.4 2001/02/26 22:12:27 he Exp $ */
/* $KAME: ah_output.c,v 1.23 2000/07/15 16:07:48 itojun Exp $ */
/*
@@ -551,8 +551,8 @@
break;
case IPOPT_LSRR:
case IPOPT_SSRR:
- if (q[i + IPOPT_OLEN] <= 0
- || optlen - i < q[i + IPOPT_OLEN]) {
+ if (q[i + IPOPT_OLEN] < 2 + sizeof(struct in_addr) ||
+ optlen - i < q[i + IPOPT_OLEN]) {
ipseclog((LOG_ERR,
"ip_finaldst: invalid IP option "
"(code=%02x len=%02x)\n",
@@ -562,8 +562,8 @@
i += q[i + IPOPT_OLEN] - sizeof(struct in_addr);
return (struct in_addr *)(q + i);
default:
- if (q[i + IPOPT_OLEN] <= 0
- || optlen - i < q[i + IPOPT_OLEN]) {
+ if (q[i + IPOPT_OLEN] < 2 ||
+ optlen - i < q[i + IPOPT_OLEN]) {
ipseclog((LOG_ERR,
"ip_finaldst: invalid IP option "
"(code=%02x len=%02x)\n",
Home |
Main Index |
Thread Index |
Old Index