Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c74b2790 authored by Venu Yeshala's avatar Venu Yeshala Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarVenu Yeshala <vyeshala@codeaurora.org>
parent 844aad38
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1017,6 +1017,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 &&