Skip to content

Commit

Permalink
usb: wusb: don't overflow the Keep Alive IE buffer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Vrabel authored and Greg Kroah-Hartman committed Apr 22, 2010
1 parent 18f9119 commit a23b648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/wusbcore/devconnect.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ static void __wusbhc_keep_alive(struct wusbhc *wusbhc)
old_keep_alives = ie->hdr.bLength - sizeof(ie->hdr);
keep_alives = 0;
for (cnt = 0;
keep_alives <= WUIE_ELT_MAX && cnt < wusbhc->ports_max;
keep_alives < WUIE_ELT_MAX && cnt < wusbhc->ports_max;
cnt++) {
unsigned tt = msecs_to_jiffies(wusbhc->trust_timeout);

Expand Down

0 comments on commit a23b648

Please sign in to comment.