diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-03-17 16:11:07 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-03-17 16:11:07 +0000 |
commit | 655efa37b5c8313ced96c25d2ed9b4346d8837fa (patch) | |
tree | 13c8308eca3d69cb00ddc51771dd2b8d03f4bc0b | |
parent | b678932bdb4b0fd73d046c7eb934809c2e3e605d (diff) |
Off-by-one; from NetBSD's coverity analysis; ok millert@
-rw-r--r-- | sbin/ping6/ping6.c | 4 |
1 files 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]); |