Revert "wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_cmd_802_11_scan_ext()"

This reverts commit 6edaf87a29.
This commit is contained in:
Ksawlii 2024-11-24 00:23:07 +01:00
parent 2f697a70d6
commit 5d007952c1
2 changed files with 3 additions and 2 deletions

View file

@ -1593,7 +1593,7 @@ struct host_cmd_ds_802_11_scan_rsp {
struct host_cmd_ds_802_11_scan_ext {
u32 reserved;
u8 tlv_buffer[];
u8 tlv_buffer[1];
} __packed;
struct mwifiex_ie_types_bss_mode {

View file

@ -2561,7 +2561,8 @@ int mwifiex_ret_802_11_scan_ext(struct mwifiex_private *priv,
ext_scan_resp = &resp->params.ext_scan;
tlv = (void *)ext_scan_resp->tlv_buffer;
buf_left = le16_to_cpu(resp->size) - (sizeof(*ext_scan_resp) + S_DS_GEN);
buf_left = le16_to_cpu(resp->size) - (sizeof(*ext_scan_resp) + S_DS_GEN
- 1);
while (buf_left >= sizeof(struct mwifiex_ie_types_header)) {
type = le16_to_cpu(tlv->type);