aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/fw
diff options
context:
space:
mode:
authorGravatar Kees Cook <keescook@chromium.org> 2021-07-27 13:58:54 -0700
committerGravatar Luca Coelho <luciano.coelho@intel.com> 2022-02-18 10:40:56 +0200
commitcb0a1fb7fd86b0062692b5056ca8552906509512 (patch)
treefe6b624dc28fc0702da9e714d8a84c205a6e34fb /drivers/net/wireless/intel/iwlwifi/fw
parentiwlwifi: mvm: Fix an error code in iwl_mvm_up() (diff)
downloadlinux-cb0a1fb7fd86b0062692b5056ca8552906509512.tar.gz
linux-cb0a1fb7fd86b0062692b5056ca8552906509512.tar.bz2
linux-cb0a1fb7fd86b0062692b5056ca8552906509512.zip
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.h2
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