Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/netinet Pull up revision 1.112 (requested by sommer...
details: https://anonhg.NetBSD.org/src/rev/7adfa65f9544
branches: netbsd-1-4
changeset: 470563:7adfa65f9544
user: he <he%NetBSD.org@localhost>
date: Sat May 06 16:43:25 2000 +0000
description:
Pull up revision 1.112 (requested by sommerfeld):
Handle large offsets inside very small options correctly.
diffstat:
sys/netinet/ip_input.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 76f42356da6b -r 7adfa65f9544 sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c Sat May 06 16:21:43 2000 +0000
+++ b/sys/netinet/ip_input.c Sat May 06 16:43:25 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_input.c,v 1.82.2.5 2000/03/02 10:24:18 he Exp $ */
+/* $NetBSD: ip_input.c,v 1.82.2.6 2000/05/06 16:43:25 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -919,7 +919,7 @@
break;
}
off--; /* 0 origin */
- if (off > optlen - sizeof(struct in_addr)) {
+ if ((off + sizeof(struct in_addr)) > optlen) {
/*
* End of source route. Should be for us.
*/
@@ -961,7 +961,7 @@
* If no space remains, ignore.
*/
off--; /* 0 origin */
- if (off > optlen - sizeof(struct in_addr))
+ if ((off + sizeof(struct in_addr)) > optlen)
break;
bcopy((caddr_t)(&ip->ip_dst), (caddr_t)&ipaddr.sin_addr,
sizeof(ipaddr.sin_addr));
Home |
Main Index |
Thread Index |
Old Index