sys/netinet6/in6_pcb.c: fix off-by-one error

Hiroki Sato hrs at allbsd.org
Tue Dec 28 02:40:23 PST 2004


Hi,

 Here is a patch for sys/netinet6/in6_pcb.c to fix a bug which was
 fixed in the FreeBSD's in6_pcb.c 1.37->1.38.

Fix an off-by-one error.

Obtained from:	FreeBSD (in6_pcb.c:1.37->1.38)

Index: in6_pcb.c
===================================================================
RCS file: /cvs/src/sys/netinet6/in6_pcb.c,v
retrieving revision 1.19
diff -d -u -I\$FreeBSD:.*\$ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.19 in6_pcb.c
--- in6_pcb.c	21 Dec 2004 02:54:47 -0000	1.19
+++ in6_pcb.c	28 Dec 2004 09:46:21 -0000
@@ -759,7 +759,7 @@
 	u_int32_t flowinfo;
 	int errno, s;
 
-	if ((unsigned)cmd > PRC_NCMDS || dst->sa_family != AF_INET6)
+	if ((unsigned)cmd >= PRC_NCMDS || dst->sa_family != AF_INET6)
 		return;
 
 	sa6_dst = (struct sockaddr_in6 *)dst;
Attachment:
pgp00020.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00020.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20041228/5af0c7f8/attachment-0018.obj>


More information about the Submit mailing list