asoc: msm_common: Update in aud_dev_sysfs_store to fix out of bound error
Update change to have proper input validation of pcm_id in aud_dev_sysfs_store to avoid out of bound issue. Change-Id: Ia95a8dff8db84d95b4b02a5674f64a85f67e4be0 Signed-off-by: Deepali Jindal <quic_deepjind@quicinc.com>
This commit is contained in:
@@ -117,7 +117,7 @@ static ssize_t aud_dev_sysfs_store(struct kobject *kobj,
|
||||
|
||||
sscanf(buf, "%d %d", &pcm_id, &state);
|
||||
|
||||
if ((pcm_id > pdata->num_aud_devs) || (pcm_id < 0)) {
|
||||
if ((pcm_id >= pdata->num_aud_devs) || (pcm_id < 0)) {
|
||||
pr_err("%s: invalid pcm id %d \n", __func__, pcm_id);
|
||||
goto done;
|
||||
}
|
||||
|
Referens i nytt ärende
Block a user