mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
Merge "dsp: q6voice: Add buf size check for cvs cal data"
This commit is contained in:
commit
3742f71065
1 changed files with 8 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
#include <linux/slab.h>
|
||||
#include <linux/kthread.h>
|
||||
|
|
@ -2852,6 +2852,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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue