summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-02-11 18:04:04 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-02-11 18:04:04 +0000
commite61cb615ad4be0a60bda4382bfc593c56b75eba5 (patch)
tree8912d29a8800195c2395faaaa929b783bf601474 /sys/netinet/ip_input.c
parent1f5035097e2fd203119fe2cbf53d3555fd75520d (diff)
ensure ipt->ipt_ptr is right; pr#96, andreas.gunnarsson@emw.ericsson.se
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 2d8ab0bedb9..77af62b5215 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.20 1997/01/26 01:23:43 tholo Exp $ */
+/* $OpenBSD: ip_input.c,v 1.21 1997/02/11 18:04:03 deraadt Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -824,7 +824,7 @@ ip_dooptions(m)
case IPOPT_TS:
code = cp - (u_char *)ip;
ipt = (struct ip_timestamp *)cp;
- if (ipt->ipt_len < 5)
+ if (ipt->ipt_ptr < 5 || ipt->ipt_len < 5)
goto bad;
if (ipt->ipt_ptr > ipt->ipt_len - sizeof (int32_t)) {
if (++ipt->ipt_oflw == 0)