Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/ipf/netinet Fix off-by-one read error.



details:   https://anonhg.NetBSD.org/src/rev/e10f7ae30318
branches:  trunk
changeset: 784024:e10f7ae30318
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Jan 15 03:39:16 2013 +0000

description:
Fix off-by-one read error.

diffstat:

 sys/external/bsd/ipf/netinet/ip_fil_netbsd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 320d22669181 -r e10f7ae30318 sys/external/bsd/ipf/netinet/ip_fil_netbsd.c
--- a/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c      Tue Jan 15 03:28:18 2013 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c      Tue Jan 15 03:39:16 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_fil_netbsd.c,v 1.3 2012/07/22 14:27:51 darrenr Exp $        */
+/*     $NetBSD: ip_fil_netbsd.c,v 1.4 2013/01/15 03:39:16 msaitoh Exp $        */
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -8,7 +8,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.3 2012/07/22 14:27:51 darrenr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.4 2013/01/15 03:39:16 msaitoh Exp $");
 #else
 static const char sccsid[] = "@(#)ip_fil.c     2.41 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp";
@@ -860,7 +860,7 @@
 
        code = fin->fin_icode;
 #ifdef USE_INET6
-       if ((code < 0) || (code > sizeof(icmptoicmp6unreach)/sizeof(int)))
+       if ((code < 0) || (code >= sizeof(icmptoicmp6unreach)/sizeof(int)))
                return -1;
 #endif
 



Home | Main Index | Thread Index | Old Index