summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-02-17 02:04:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-02-17 02:04:39 +0000
commitecdf2b0846992cd9ef85f54dcd64d136b2ad19f6 (patch)
tree0ccfd7bf87d104361c98678a78e6dbbe2648585a /sbin
parent1966625bcaff4c11f37a9e2a84b78c4780120fb6 (diff)
correct arithmetic brain damage; maxim@macomnet.ru
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ping/ping.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index ccf24ad1ec8..41014dcaf4c 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping.c,v 1.49 2002/02/16 21:27:37 millert Exp $ */
+/* $OpenBSD: ping.c,v 1.50 2002/02/17 02:04:38 deraadt Exp $ */
/* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: ping.c,v 1.49 2002/02/16 21:27:37 millert Exp $";
+static char rcsid[] = "$OpenBSD: ping.c,v 1.50 2002/02/17 02:04:38 deraadt Exp $";
#endif
#endif /* not lint */
@@ -853,8 +853,8 @@ pr_pack(buf, cc, from)
break;
default:
(void)printf("\nunknown option %x", *cp);
- hlen = hlen + cp[1] - 1;
- cp = cp + cp[1] - 1;
+ hlen = hlen - (cp[IPOPT_OLEN] - 1);
+ cp = cp + (cp[IPOPT_OLEN] - 1);
break;
}
if (!(options & F_FLOOD)) {