mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
HID: rmi: check report length before trimming sentinel bytes
rmi_check_sanity() trims trailing 0xff sentinel bytes, but its loop reads data[valid_size - 1] before checking that valid_size is non-zero. Reverse the condition so the length is proved before the last byte is inspected. Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Signed-off-by: Jiri Kosina <jkosina@suse.com>
This commit is contained in:
parent
08d8814521
commit
28a3e326fa
1 changed files with 1 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue