aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2015-05-31 08:10:35 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2015-05-31 08:10:35 +0000
commitf826bfc33f178e757ab4bcc7c1d2df8659d42c7c (patch)
tree9966084b97cc1a8a73262abe601eb7c7f307d5b0 /contrib
parent97f8390e7d46efe752586bb3812e78ae0c277cfd (diff)
Notes
Diffstat (limited to 'contrib')
-rw-r--r--contrib/traceroute/traceroute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/traceroute/traceroute.c b/contrib/traceroute/traceroute.c
index 040d04d6b459..8ecacfea95d8 100644
--- a/contrib/traceroute/traceroute.c
+++ b/contrib/traceroute/traceroute.c
@@ -1346,8 +1346,8 @@ packet_ok(register u_char *buf, int cc, register struct sockaddr_in *from,
Printf("\n%d bytes from %s to ", cc, inet_ntoa(from->sin_addr));
Printf("%s: icmp type %d (%s) code %d\n",
inet_ntoa(ip->ip_dst), type, pr_type(type), icp->icmp_code);
- for (i = 4; i < cc ; i += sizeof(*lp))
- Printf("%2d: x%8.8x\n", i, *lp++);
+ for (i = 4; i <= cc - ICMP_MINLEN; i += sizeof(*lp))
+ Printf("%2d: %8.8x\n", i, ntohl(*lp++));
}
#endif
return(0);