Unverified Commit 8975c967 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13025 wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_cmd_802_11_scan_ext()

parents 6293e47f 43ff3060
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1587,7 +1587,7 @@ struct host_cmd_ds_802_11_scan_rsp {

struct host_cmd_ds_802_11_scan_ext {
	u32   reserved;
	u8    tlv_buffer[1];
	u8    tlv_buffer[];
} __packed;

struct mwifiex_ie_types_bss_mode {
+1 −2
Original line number Diff line number Diff line
@@ -2543,8 +2543,7 @@ 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
					      - 1);
	buf_left = le16_to_cpu(resp->size) - (sizeof(*ext_scan_resp) + S_DS_GEN);

	while (buf_left >= sizeof(struct mwifiex_ie_types_header)) {
		type = le16_to_cpu(tlv->type);