iwlwifi: dbg_ini: Split memcpy() to avoid multi-field write
authorKees Cook <keescook@chromium.org>
Tue, 27 Jul 2021 20:58:54 +0000 (13:58 -0700)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 18 Feb 2022 08:40:56 +0000 (10:40 +0200)
commitcb0a1fb7fd86b0062692b5056ca8552906509512
treefe6b624dc28fc0702da9e714d8a84c205a6e34fb
parent583d18336abdfb1b355270289ff8f6a2608ba905
iwlwifi: dbg_ini: Split memcpy() to avoid multi-field write

To avoid a run-time false positive in the stricter FORTIFY_SOURCE
memcpy() checks, split the memcpy() into the struct and the data.
Additionally switch the data member to a flexible array to follow
modern language conventions.

Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210727205855.411487-64-keescook@chromium.org
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/file.h
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c