Module Name:    src
Committed By:   bouyer
Date:           Sun Feb  5 12:34:56 UTC 2012

Modified Files:
        src/sys/net [netbsd-5]: route.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1721):
        sys/net/route.c: revision 1.126
Count length from the beginning of the structure not the sa_data portion.
=46rom skrll@


To generate a diff of this commit:
cvs rdiff -u -r1.113.4.1 -r1.113.4.2 src/sys/net/route.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/route.c
diff -u src/sys/net/route.c:1.113.4.1 src/sys/net/route.c:1.113.4.2
--- src/sys/net/route.c:1.113.4.1	Fri Apr  3 17:59:03 2009
+++ src/sys/net/route.c	Sun Feb  5 12:34:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.113.4.1 2009/04/03 17:59:03 snj Exp $	*/
+/*	$NetBSD: route.c,v 1.113.4.2 2012/02/05 12:34:55 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -93,7 +93,7 @@
 #include "opt_route.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.113.4.1 2009/04/03 17:59:03 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.113.4.2 2012/02/05 12:34:55 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/sysctl.h>
@@ -847,8 +847,8 @@ rt_maskedcopy(const struct sockaddr *src
 	const char *netmaskp = &netmask->sa_data[0],
 	           *srcp = &src->sa_data[0];
 	char *dstp = &dst->sa_data[0];
-	const char *maskend = dstp + MIN(netmask->sa_len, src->sa_len);
-	const char *srcend = dstp + src->sa_len;
+	const char *maskend = (char *)dst + MIN(netmask->sa_len, src->sa_len);
+	const char *srcend = (char *)dst + src->sa_len;
 
 	dst->sa_len = src->sa_len;
 	dst->sa_family = src->sa_family;

Reply via email to