diff options
author | Kees Cook <keescook@chromium.org> | 2021-07-27 23:58:54 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2022-02-18 11:40:56 +0300 |
commit | cb0a1fb7fd86b0062692b5056ca8552906509512 (patch) | |
tree | fe6b624dc28fc0702da9e714d8a84c205a6e34fb /drivers/net/wireless/intel/iwlwifi/fw | |
parent | 583d18336abdfb1b355270289ff8f6a2608ba905 (diff) | |
download | linux-cb0a1fb7fd86b0062692b5056ca8552906509512.tar.xz |
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>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/file.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h index f44aedb3f049..fa2a73ae4183 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/file.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h @@ -119,7 +119,7 @@ enum iwl_ucode_tlv_type { struct iwl_ucode_tlv { __le32 type; /* see above */ __le32 length; /* not including type/length fields */ - u8 data[0]; + u8 data[]; }; #define IWL_TLV_UCODE_MAGIC 0x0a4c5749 |