mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Merge "dsp: update size check for get VI param function"
This commit is contained in:
commit
f8b4b87d8b
1 changed files with 5 additions and 2 deletions
|
|
@ -10936,6 +10936,7 @@ static int afe_get_cal_sp_th_vi_param(int32_t cal_type, size_t data_size,
|
|||
|
||||
if (cal_data == NULL ||
|
||||
data_size > sizeof(*cal_data) ||
|
||||
data_size < sizeof(cal_data->cal_hdr) ||
|
||||
this_afe.cal_data[AFE_FB_SPKR_PROT_TH_VI_CAL] == NULL)
|
||||
return 0;
|
||||
|
||||
|
|
@ -10964,7 +10965,8 @@ 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) ||
|
||||
data_size < sizeof(cal_data->cal_hdr))
|
||||
goto done;
|
||||
|
||||
mutex_lock(&this_afe.cal_data[AFE_FB_SPKR_PROT_V4_EX_VI_CAL]->lock);
|
||||
|
|
@ -11031,7 +11033,8 @@ 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) ||
|
||||
data_size < sizeof(cal_data->cal_hdr))
|
||||
goto done;
|
||||
|
||||
mutex_lock(&this_afe.cal_data[AFE_FB_SPKR_PROT_EX_VI_CAL]->lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue