mirror of
https://github.com/openbsd/src.git
synced 2024-12-22 16:42:56 -08:00
Oops, the tweak was not correct, go with my original version.
Pointed out by tb.
This commit is contained in:
parent
1c5a930328
commit
1c9f076b70
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ping.c,v 1.247 2022/12/01 07:11:17 florian Exp $ */
|
||||
/* $OpenBSD: ping.c,v 1.248 2022/12/01 07:34:06 florian Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
@ -1525,7 +1525,7 @@ pr_ipopt(int hlen, u_char *buf)
|
||||
break;
|
||||
default:
|
||||
printf("\nunknown option %x", *cp);
|
||||
if (cp[IPOPT_OLEN] > 0 && cp[IPOPT_OLEN] < hlen) {
|
||||
if (cp[IPOPT_OLEN] > 0 && (cp[IPOPT_OLEN] - 1) <= hlen) {
|
||||
hlen = hlen - (cp[IPOPT_OLEN] - 1);
|
||||
cp = cp + (cp[IPOPT_OLEN] - 1);
|
||||
} else
|
||||
|
Loading…
Reference in New Issue
Block a user