Commit a23b64845f1ed0c090e30a70ca747a379674e006

Authored by David Vrabel
Committed by Greg Kroah-Hartman
1 parent 18f91196b6

usb: wusb: don't overflow the Keep Alive IE buffer

The Keep Alive IE only has space for WUIE_ELT_MAX (== 4) device addresses.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/usb/wusbcore/devconnect.c
... ... @@ -438,7 +438,7 @@
438 438 old_keep_alives = ie->hdr.bLength - sizeof(ie->hdr);
439 439 keep_alives = 0;
440 440 for (cnt = 0;
441   - keep_alives <= WUIE_ELT_MAX && cnt < wusbhc->ports_max;
  441 + keep_alives < WUIE_ELT_MAX && cnt < wusbhc->ports_max;
442 442 cnt++) {
443 443 unsigned tt = msecs_to_jiffies(wusbhc->trust_timeout);
444 444