usbhost_composite: fix end offset in usbhost_copyinterface()

This commit is contained in:
Janne Rosberg 2016-11-30 12:18:23 -06:00 committed by Gregory Nutt
parent a03d26e88d
commit 4b282f219a

View file

@ -337,7 +337,7 @@ static int usbhost_copyinterface(uint8_t ifno, FAR const uint8_t *configdesc,
*/
for (offset += len;
offset < desclen - sizeof(struct usb_ifdesc_s);
offset <= desclen - sizeof(struct usb_epdesc_s);
offset += len)
{
epdesc = (FAR struct usb_epdesc_s *)&configdesc[offset];