From 655efa37b5c8313ced96c25d2ed9b4346d8837fa Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 17 Mar 2006 16:11:07 +0000 Subject: Off-by-one; from NetBSD's coverity analysis; ok millert@ --- sbin/ping6/ping6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c index a7215ade766..499f3c66b4d 100644 --- a/sbin/ping6/ping6.c +++ b/sbin/ping6/ping6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping6.c,v 1.62 2006/03/06 10:45:57 djm Exp $ */ +/* $OpenBSD: ping6.c,v 1.63 2006/03/17 16:11:06 otto Exp $ */ /* $KAME: ping6.c,v 1.163 2002/10/25 02:19:06 itojun Exp $ */ /* @@ -2433,7 +2433,7 @@ pr_icmph(struct icmp6_hdr *icp, u_char *end) break; } if (options & F_VERBOSE) { - if (ni->ni_code > sizeof(nircode) / sizeof(nircode[0])) + if (ni->ni_code >= sizeof(nircode) / sizeof(nircode[0])) printf(", invalid"); else printf(", %s", nircode[ni->ni_code]); -- cgit v1.2.3