summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Latifi <pat@cvs.openbsd.org>2006-03-30 06:39:37 +0000
committerPatrick Latifi <pat@cvs.openbsd.org>2006-03-30 06:39:37 +0000
commit4c6463cd5552eeb73253d8e032706ccf617e7bc8 (patch)
treed7ac3d09a40b7333112f4bf372e88acb48705fd2 /lib
parentfcff593da564d69c00a6a0bf92b97c16f4311ce1 (diff)
Fix a bzero() misuse; ok otto@ deraadt@
Diffstat (limited to 'lib')
-rw-r--r--lib/libusbhid/usage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libusbhid/usage.c b/lib/libusbhid/usage.c
index bcfa0d8d1ea..164e9e6a93b 100644
--- a/lib/libusbhid/usage.c
+++ b/lib/libusbhid/usage.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usage.c,v 1.9 2006/03/21 21:38:55 jaredy Exp $ */
+/* $OpenBSD: usage.c,v 1.10 2006/03/30 06:39:36 pat Exp $ */
/* $NetBSD: usage.c,v 1.1 2001/12/28 17:45:27 augustss Exp $ */
/*
@@ -159,7 +159,8 @@ hid_start(const char *hidname)
}
pages = new;
bzero(pages + npagesmax,
- npagesmax - npagesmax);
+ (len - npagesmax) *
+ sizeof(struct usage_page));
}
if (!pages) {
free(n);