mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
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>
This commit is contained in:
parent
18f91196b6
commit
a23b64845f
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue