mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
tas25xx_algo:add protection for tas25xx_set_profile
- fix StsHostTestCases - android.security.sts.Poc17_06#testPocCVE_2017_7369 - when sts test, the profile_id is negative value. as <3>[ 61.218757] tas25xx_set_profile profile_id=-2147479279,param_id=0 need to add protection. Change-Id: Ia8eb4dc7a1a7ae869e3a254ed3cd0fa6b329c04b Signed-off-by: liaohj <liaohj@lenovo.com> Reviewed-on: https://gerrit.mot.com/1431155 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wanlong Zhou <zhouwl@motorola.com> Reviewed-by: Hujun Liao <liaohj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
8ad2f33e11
commit
1929a78679
1 changed files with 1 additions and 1 deletions
|
|
@ -169,7 +169,7 @@ static int tas25xx_set_profile(struct snd_kcontrol *pKcontrol,
|
|||
int profile_id = pUcontrol->value.integer.value[0];
|
||||
int param_id = 0;
|
||||
int max_number_of_profiles = sizeof(profile_index_text)/sizeof(profile_index_text[0]);
|
||||
if (profile_id >= max_number_of_profiles)
|
||||
if ((profile_id >= max_number_of_profiles) || (profile_id < 0))
|
||||
return -EINVAL;
|
||||
|
||||
pr_info("TI-SmartPA: %s: Setting profile %s", __func__, profile_index_text[profile_id]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue