Re: [PATCH 1/2] Input: elan_i2c - Add new trackpoint report type 0x5F.
From: 'Dmitry Torokhov'
Date: Thu Dec 10 2020 - 22:06:46 EST
Hi Jingle,
On Fri, Dec 11, 2020 at 10:38:22AM +0800, jingle wrote:
> HI Dmitry:
Please do not top post on the kernel mailing lists.
>
> I would prefer if we validated report length versus the packet type before
> accepting it.
>
> -> If the tracking point report is 0x5F, the report length is 7, but the
> touchpad report length is 32.
> -> So, report length will be different with this module.
Right, but we could check the report type when we receive the data and
refuse it if length does not match what is expected for the report type
received. This can happen before we pass the data on to the
elan_i2c_core.
Thanks.
--
Dmitry