diff options
author | Patrick Latifi <pat@cvs.openbsd.org> | 2006-03-30 06:39:37 +0000 |
---|---|---|
committer | Patrick Latifi <pat@cvs.openbsd.org> | 2006-03-30 06:39:37 +0000 |
commit | 4c6463cd5552eeb73253d8e032706ccf617e7bc8 (patch) | |
tree | d7ac3d09a40b7333112f4bf372e88acb48705fd2 /lib/libusbhid | |
parent | fcff593da564d69c00a6a0bf92b97c16f4311ce1 (diff) |
Fix a bzero() misuse; ok otto@ deraadt@
Diffstat (limited to 'lib/libusbhid')
-rw-r--r-- | lib/libusbhid/usage.c | 5 |
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); |