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

Commit e67e8bf9 authored by Srikanth Uyyala's avatar Srikanth Uyyala Committed by Gerrit - the friendly Code Review server
Browse files

msm: ispif: fix the OOB read issue



array 'entries' indexed without any conditional check
fix this by checking index against array size.

Change-Id: Ie41890ca26d4a780d13e65ee78b7a4f51f6183ea
Signed-off-by: default avatarSrikanth Uyyala <suyyala@codeaurora.org>
parent e0730eab
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1021,6 +1021,9 @@ static void msm_ispif_config_stereo(struct ispif_device *ispif,
	enum msm_ispif_vfe_intf vfe_intf;
	uint32_t stereo_3d_threshold = STEREO_DEFAULT_3D_THRESHOLD;

	if (params->num > MAX_PARAM_ENTRIES)
		return;

	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)) {