Re: [PATCH] HID: rmi: check report length before trimming sentinel bytes
From: Jiri Kosina
Date: Mon Aug 03 2026 - 14:23:18 EST
On Tue, 30 Jun 2026, Pengpeng Hou wrote:
> 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.
Applied, thanks.
--
Jiri Kosina
SUSE Labs