]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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>
Wed, 25 Aug 2021 15:38:40 +0000 (08:38 -0700)
commit1cff309e1de1722dfdc34c6630a6b2853808646b
tree3028ccd8ea5f1f727b0775da74005f36b6254948
parent8a61df2aec5bac991ca7b79bdeb11d536102e32c
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