HID: roccat: Use struct_group() to zero kone_mouse_event
authorKees Cook <keescook@chromium.org>
Fri, 21 May 2021 02:56:15 +0000 (19:56 -0700)
committerKees Cook <keescook@chromium.org>
Sat, 25 Sep 2021 15:20:48 +0000 (08:20 -0700)
commit69dae0fe1073944065fff0f7fe24cde6e150ee9d
treee8a039a46b42c3e71befea74608a7197a805ac71
parent5e423a0c2db6d02811e67704d1bcb0b412b98406
HID: roccat: Use struct_group() to zero kone_mouse_event

In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memset(), avoid intentionally writing across
neighboring fields.

Add struct_group() to mark region of struct kone_mouse_event that should
be initialized to zero.

Cc: Stefan Achatz <erazor_de@users.sourceforge.net>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org
Acked-by: Jiri Kosina <jikos@kernel.org>
Link: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2108201810560.15313@cbobk.fhfr.pm
Signed-off-by: Kees Cook <keescook@chromium.org>
drivers/hid/hid-roccat-kone.c
drivers/hid/hid-roccat-kone.h