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

Commit fbde892b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: Fix array out of bound and use after NULL check"

parents ce9aab8f c7a99e2b
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -88,7 +88,8 @@ int ipa_rm_dep_graph_get_resource(
		goto bail;
	}
	resource_index = ipa_rm_dep_get_index(resource_name);
	if (resource_index == IPA_RM_INDEX_INVALID) {
	if (resource_index == IPA_RM_INDEX_INVALID ||
		resource_index >= IPA_RM_RESOURCE_MAX) {
		result = -EINVAL;
		goto bail;
	}
@@ -120,7 +121,8 @@ int ipa_rm_dep_graph_add(struct ipa_rm_dep_graph *graph,
		goto bail;
	}
	resource_index = ipa_rm_dep_get_index(resource->name);
	if (resource_index == IPA_RM_INDEX_INVALID) {
	if (resource_index == IPA_RM_INDEX_INVALID ||
		resource_index >= IPA_RM_RESOURCE_MAX) {
		result = -EINVAL;
		goto bail;
	}
+4 −1
Original line number Diff line number Diff line
@@ -2677,7 +2677,10 @@ int rmnet_ipa_query_tethering_stats(struct wan_ioctl_query_tether_stats *data,
		IPAWANERR("reset the pipe stats\n");
	} else {
		/* print tethered-client enum */
		IPAWANDBG_LOW("Tethered-client enum(%d)\n", data->ipa_client);
		if (data == NULL)
			return -EINVAL;
		IPAWANDBG_LOW("Tethered-client enum(%d)\n",
				data->ipa_client);
	}

	rc = ipa_qmi_get_data_stats(req, resp);
+4 −1
Original line number Diff line number Diff line
@@ -2835,7 +2835,10 @@ int rmnet_ipa3_query_tethering_stats(struct wan_ioctl_query_tether_stats *data,
		IPAWANERR("reset the pipe stats\n");
	} else {
		/* print tethered-client enum */
		IPAWANDBG_LOW("Tethered-client enum(%d)\n", data->ipa_client);
		if (data == NULL)
			return -EINVAL;
		IPAWANDBG_LOW("Tethered-client enum(%d)\n",
				data->ipa_client);
	}

	rc = ipa3_qmi_get_data_stats(req, resp);