mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
Merge "dsp: update size check for set/get VI param function"
This commit is contained in:
commit
e6e670fddc
1 changed files with 6 additions and 1 deletions
|
|
@ -11029,6 +11029,9 @@ static int afe_set_cal_sp_th_vi_cfg(int32_t cal_type, size_t data_size,
|
|||
|
||||
if (cal_data == NULL ||
|
||||
data_size > sizeof(*cal_data) ||
|
||||
(data_size < sizeof(cal_data->cal_hdr) +
|
||||
sizeof(cal_data->cal_data) +
|
||||
sizeof(cal_data->cal_info.mode)) ||
|
||||
this_afe.cal_data[AFE_FB_SPKR_PROT_TH_VI_CAL] == NULL)
|
||||
goto done;
|
||||
|
||||
|
|
@ -11246,7 +11249,9 @@ 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) ||
|
||||
(data_size < sizeof(cal_data->cal_hdr) +
|
||||
sizeof(cal_data->cal_data) +
|
||||
sizeof(cal_data->cal_info.mode)) ||
|
||||
this_afe.cal_data[AFE_FB_SPKR_PROT_TH_VI_CAL] == NULL)
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue