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

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

Merge "ASoC: msm: qdsp6v2: DAP: Update check to validate data length"

parents 680942a5 c3c9341b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1523,8 +1523,9 @@ static int msm_ds2_dap_get_param(u32 cmd, void *arg)
	}

	/* Return if invalid length */
	if (dolby_data->length >
	       (DOLBY_MAX_LENGTH_INDIVIDUAL_PARAM - DOLBY_PARAM_PAYLOAD_SIZE)) {
	if ((dolby_data->length >
	      (DOLBY_MAX_LENGTH_INDIVIDUAL_PARAM - DOLBY_PARAM_PAYLOAD_SIZE)) ||
	      (dolby_data->length <= 0)) {
		pr_err("Invalid length %d", dolby_data->length);
		rc = -EINVAL;
		goto end;