Merge "dsp: Add size check for afe set and get functions"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
4de5775619
@@ -8456,6 +8456,7 @@ static int afe_set_cal_sp_th_vi_cfg(int32_t cal_type, size_t data_size,
|
||||
uint32_t mode;
|
||||
|
||||
if (cal_data == NULL ||
|
||||
data_size != sizeof(*cal_data) ||
|
||||
this_afe.cal_data[AFE_FB_SPKR_PROT_TH_VI_CAL] == NULL)
|
||||
goto done;
|
||||
|
||||
@@ -8599,6 +8600,7 @@ static int afe_get_cal_sp_th_vi_param(int32_t cal_type, size_t data_size,
|
||||
int ret = 0;
|
||||
|
||||
if (cal_data == NULL ||
|
||||
data_size != sizeof(*cal_data) ||
|
||||
this_afe.cal_data[AFE_FB_SPKR_PROT_TH_VI_CAL] == NULL)
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user