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

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

Merge "dsp: q6voice: Add buf size check for cvs cal data"

parents f863d498 b6877fa2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2759,6 +2759,13 @@ static int voice_send_cvs_register_cal_cmd(struct voice_data *v)
		goto unlock;
	}

	if (col_data->cal_data.size >= MAX_COL_INFO_SIZE) {
		pr_err("%s: Invalid cal data size %d!\n",
			__func__, col_data->cal_data.size);
		ret = -EINVAL;
		goto unlock;
	}

	memcpy(&cvs_reg_cal_cmd.cvs_cal_data.column_info[0],
	       (void *) &((struct audio_cal_info_voc_col *)
	       col_data->cal_info)->data,