summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2019-03-03 16:31:12 +0000
committerderaadt <deraadt@openbsd.org>2019-03-03 16:31:12 +0000
commitcd4289edfffeca0a8d14ed1750c4004d4efc098e (patch)
tree7e8cd02a77af54eb004a4aa1588212149520b6ed
parenton malloc(3) failure, gracefully abort processing of the current file (diff)
downloadwireguard-openbsd-cd4289edfffeca0a8d14ed1750c4004d4efc098e.tar.xz
wireguard-openbsd-cd4289edfffeca0a8d14ed1750c4004d4efc098e.zip
Found some historical code. Don't cast the pointer for bzero to a different type,
and definately don't do this to the length: (unsigned)(cplim2 - cp2) ok claudio
-rw-r--r--sys/net/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 61ac149a949..512d554dc41 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.382 2019/02/15 21:16:01 claudio Exp $ */
+/* $OpenBSD: route.c,v 1.383 2019/03/03 16:31:12 deraadt Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -1026,7 +1026,7 @@ rt_maskedcopy(struct sockaddr *src, struct sockaddr *dst,
while (cp2 < cplim)
*cp2++ = *cp1++ & *cp3++;
if (cp2 < cplim2)
- bzero((caddr_t)cp2, (unsigned)(cplim2 - cp2));
+ bzero(cp2, cplim2 - cp2);
}
int