summaryrefslogtreecommitdiffstats
path: root/src/drivers/bus
diff options
context:
space:
mode:
authorMichael Brown2017-03-22 13:14:57 +0100
committerMichael Brown2017-03-22 13:14:57 +0100
commit21d8624da828f35f544b5bc7a764eb7f7edea90b (patch)
tree4319c87696bc987d9f37a590d15d4b20ae203191 /src/drivers/bus
parent[pixbuf] Avoid potential division by zero (diff)
downloadipxe-21d8624da828f35f544b5bc7a764eb7f7edea90b.tar.gz
ipxe-21d8624da828f35f544b5bc7a764eb7f7edea90b.tar.xz
ipxe-21d8624da828f35f544b5bc7a764eb7f7edea90b.zip
[usb] Use correct length for memcpy()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/bus')
-rw-r--r--src/drivers/bus/usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/bus/usb.c b/src/drivers/bus/usb.c
index cad26c77..bd2a446b 100644
--- a/src/drivers/bus/usb.c
+++ b/src/drivers/bus/usb.c
@@ -1005,8 +1005,8 @@ static int usb_describe ( struct usb_device *usb,
}
/* Describe function */
- memcpy ( &desc->class, &association->class,
- sizeof ( desc->class ) );
+ memcpy ( &desc->class.class, &association->class,
+ sizeof ( desc->class.class ) );
desc->count = association->count;
for ( i = 0 ; i < association->count ; i++ )
interfaces[i] = ( first + i );