diff options
author | David Vrabel <david.vrabel@csr.com> | 2010-03-22 14:50:14 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-22 22:18:22 (GMT) |
commit | a23b64845f1ed0c090e30a70ca747a379674e006 (patch) | |
tree | 603bf71c16284622eb6e53cb51cb996fa5ab7b6b | |
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>
-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 46e79d3..7ec24e4 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); |