Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a1d8dfe authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: fix to validate the ioctl WAN_IOC_SEND_LAN_CLIENT_MSG params"

parents 75d108a9 d15b66fd
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -4072,6 +4072,15 @@ int rmnet_ipa3_send_lan_client_msg(
		IPAWANERR("Can't allocate memory for tether_info\n");
		IPAWANERR("Can't allocate memory for tether_info\n");
		return -ENOMEM;
		return -ENOMEM;
	}
	}

	if (data->client_event != IPA_PER_CLIENT_STATS_CONNECT_EVENT &&
		data->client_event != IPA_PER_CLIENT_STATS_DISCONNECT_EVENT) {
		IPAWANERR("Wrong event given. Event:- %d\n",
			data->client_event);
		kfree(lan_client);
		return -EINVAL;
	}
	data->lan_client.lanIface[IPA_RESOURCE_NAME_MAX-1] = '\0';
	memset(&msg_meta, 0, sizeof(struct ipa_msg_meta));
	memset(&msg_meta, 0, sizeof(struct ipa_msg_meta));
	memcpy(lan_client, &data->lan_client,
	memcpy(lan_client, &data->lan_client,
		sizeof(struct ipa_lan_client_msg));
		sizeof(struct ipa_lan_client_msg));