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

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

Merge "msm: adm: Add error check to avoid memory overread"

parents 59350f38 5373a62d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1614,9 +1614,12 @@ static int32_t adm_callback(struct apr_client_data *data, void *priv)
				pr_err(":err = 0x%x\n", payload[0]);
			} else if (data->payload_size >=
				   (2 * sizeof(uint32_t))) {
				if (payload[1] >
				if ((payload[1] >
					   ((ADM_GET_TOPO_MODULE_LIST_LENGTH /
					   sizeof(uint32_t)) - 1)) {
					   sizeof(uint32_t)) - 1))  ||
				((data->payload_size -
				(2 *  sizeof(uint32_t))) <
				(payload[1] * sizeof(uint32_t))))  {
					pr_err("%s: ADM_CMDRSP_GET_PP_TOPO_MODULE_LIST",
						 __func__);
					pr_err(":size = %d\n", payload[1]);