summaryrefslogtreecommitdiff
path: root/drivers/regulator/fixed-helper.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2014-12-12 03:02:45 +0300
committerJiri Kosina <jkosina@suse.cz>2014-12-12 11:36:20 +0300
commitd1c7e29e8d276c669e8790bb8be9f505ddc48888 (patch)
tree4067652204d865084fe2c863e281b176a32e803e /drivers/regulator/fixed-helper.c
parentdff674168878fe7b6d8b9ad60d62295ec517de79 (diff)
downloadlinux-d1c7e29e8d276c669e8790bb8be9f505ddc48888.tar.xz
HID: i2c-hid: prevent buffer overflow in early IRQ
Before ->start() is called, bufsize size is set to HID_MIN_BUFFER_SIZE, 64 bytes. While processing the IRQ, we were asking to receive up to wMaxInputLength bytes, which can be bigger than 64 bytes. Later, when ->start is run, a proper bufsize will be calculated. Given wMaxInputLength is said to be unreliable in other part of the code, set to receive only what we can even if it results in truncated reports. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/regulator/fixed-helper.c')
0 files changed, 0 insertions, 0 deletions