mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
Merge "dsp: fix out of bound access for cal_data size"
This commit is contained in:
commit
4c1f3568b0
1 changed files with 2 additions and 4 deletions
|
|
@ -11280,8 +11280,7 @@ static int afe_get_cal_spv4_ex_vi_ftm_param(int32_t cal_type, size_t data_size,
|
|||
pr_debug("%s: cal_type = %d\n", __func__, cal_type);
|
||||
if (this_afe.cal_data[AFE_FB_SPKR_PROT_V4_EX_VI_CAL] == NULL ||
|
||||
cal_data == NULL ||
|
||||
data_size > sizeof(*cal_data) ||
|
||||
data_size < sizeof(cal_data->cal_hdr))
|
||||
data_size != sizeof(*cal_data))
|
||||
goto done;
|
||||
|
||||
mutex_lock(&this_afe.cal_data[AFE_FB_SPKR_PROT_V4_EX_VI_CAL]->lock);
|
||||
|
|
@ -11348,8 +11347,7 @@ static int afe_get_cal_sp_ex_vi_ftm_param(int32_t cal_type, size_t data_size,
|
|||
pr_debug("%s: cal_type = %d\n", __func__, cal_type);
|
||||
if (this_afe.cal_data[AFE_FB_SPKR_PROT_EX_VI_CAL] == NULL ||
|
||||
cal_data == NULL ||
|
||||
data_size > sizeof(*cal_data) ||
|
||||
data_size < sizeof(cal_data->cal_hdr))
|
||||
data_size != sizeof(*cal_data))
|
||||
goto done;
|
||||
|
||||
mutex_lock(&this_afe.cal_data[AFE_FB_SPKR_PROT_EX_VI_CAL]->lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue