diff options
author | David Vrabel <david.vrabel@csr.com> | 2010-03-22 17:50:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-23 02:18:22 +0400 |
commit | a23b64845f1ed0c090e30a70ca747a379674e006 (patch) | |
tree | 603bf71c16284622eb6e53cb51cb996fa5ab7b6b /drivers/usb/wusbcore/devconnect.c | |
parent | 18f91196b6e7994bd694a96a6c3b0ac1f3e81d82 (diff) | |
download | linux-a23b64845f1ed0c090e30a70ca747a379674e006.tar.xz |
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>
Diffstat (limited to 'drivers/usb/wusbcore/devconnect.c')
-rw-r--r-- | drivers/usb/wusbcore/devconnect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c index 46e79d349498..7ec24e46b34b 100644 --- a/drivers/usb/wusbcore/devconnect.c +++ b/drivers/usb/wusbcore/devconnect.c @@ -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); |