msm: isp: camera: Avoid potential out of bound write
Check the validity of VFE interface parameter that is provided from userspace. Change-Id: I0ebb95c824ab3f832aaf500a6655829cca846c3d Signed-off-by: Venu Yeshala <vyeshala@codeaurora.org>
This commit is contained in:
parent
a62f42964d
commit
25eeb3a3b2
1 changed files with 5 additions and 0 deletions
|
@ -1021,6 +1021,11 @@ static void msm_ispif_config_stereo(struct ispif_device *ispif,
|
|||
|
||||
for (i = 0; i < params->num; i++) {
|
||||
vfe_intf = params->entries[i].vfe_intf;
|
||||
if (!msm_ispif_is_intf_valid(ispif->csid_version, vfe_intf)) {
|
||||
pr_err("%s: invalid interface type %d\n", __func__,
|
||||
vfe_intf);
|
||||
return;
|
||||
}
|
||||
if (params->entries[i].intftype == PIX0 &&
|
||||
params->stereo_enable &&
|
||||
params->right_entries[i].csid < CSID_MAX &&
|
||||
|
|
Loading…
Add table
Reference in a new issue