diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-04-14 18:06:44 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2018-04-25 11:52:42 +0300 |
commit | 37ba3c350e64adcbdd483e81bf194c05d9573515 (patch) | |
tree | 250ee87fd3a8c4f1829a17fb74ed79709be6a510 /drivers/hid/i2c-hid | |
parent | 097b8f62dd793e08f1732fc74dbb64596c7fbff9 (diff) | |
download | linux-37ba3c350e64adcbdd483e81bf194c05d9573515.tar.xz |
HID: intel_ish-hid: Move header size check to inside the loop
With the headersize check outside of the loop, the second time through
the loop the: "payload_len = recv_msg->hdr.size;" statement may deref
recv_msg while it is pointing outside of our input buffer.
Move the headersize check to inside the loop to fix this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/i2c-hid')
0 files changed, 0 insertions, 0 deletions