mbox series

[0/4] HID: hid-uclogic-params: Fix NULL pointer dereferences

Message ID 20220105172915.131091-1-jose.exposito89@gmail.com (mailing list archive)
Headers show
Series HID: hid-uclogic-params: Fix NULL pointer dereferences | expand

Message

José Expósito Jan. 5, 2022, 5:29 p.m. UTC
Hi everyone,

This series fixes 4 possible NULL pointer dereference errors
present in hid-uclogic-params.c found by Coverity.

Even though the fixes are small and very similar I made them
in 4 patches to include the Coverity ID on each of them and
make Coverity happy.

I didn't find any code calling the functions with invalid
params, but since the check is there, it's better to make sure
that it's doing its job.

Thanks,
José Expósito

José Expósito (4):
  HID: hid-uclogic-params: Invalid parameter check in
    uclogic_params_init
  HID: hid-uclogic-params: Invalid parameter check in
    uclogic_params_get_str_desc
  HID: hid-uclogic-params: Invalid parameter check in
    uclogic_params_huion_init
  HID: hid-uclogic-params: Invalid parameter check in
    uclogic_params_frame_init_v1_buttonpad

 drivers/hid/hid-uclogic-params.c | 31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)

Comments

Jiri Kosina Jan. 6, 2022, 1:14 p.m. UTC | #1
On Wed, 5 Jan 2022, José Expósito wrote:

> Hi everyone,
> 
> This series fixes 4 possible NULL pointer dereference errors
> present in hid-uclogic-params.c found by Coverity.
> 
> Even though the fixes are small and very similar I made them
> in 4 patches to include the Coverity ID on each of them and
> make Coverity happy.
> 
> I didn't find any code calling the functions with invalid
> params, but since the check is there, it's better to make sure
> that it's doing its job.

Thanks, I've queued the series.