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

Commit 9db5c674 authored by Jayant Shekhar's avatar Jayant Shekhar
Browse files

msm: mdss: Fix potential stack corruption issue



Fix potential stack corruption issue which is possible
due to different datatype for arguments used in callee
and caller function.

Change-Id: I564f62af7574c8eaa3ac8f55de0f0732223cae42
Signed-off-by: default avatarJayant Shekhar <jshekhar@codeaurora.org>
parent c5bc590f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -455,6 +455,7 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe,
	bool is_fbc = false;
	struct mdss_mdp_prefill_params prefill_params;
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	bool calc_smp_size = false;

	if (!pipe || !perf || !pipe->mixer_left)
		return -EINVAL;
@@ -544,8 +545,9 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe,
		return 0;
	}

	calc_smp_size = (flags & PERF_CALC_PIPE_CALC_SMP_SIZE) ? true : false;
	prefill_params.smp_bytes = mdss_mdp_perf_calc_smp_size(pipe,
		(flags & PERF_CALC_PIPE_CALC_SMP_SIZE));
			calc_smp_size);
	prefill_params.xres = xres;
	prefill_params.src_w = src.w;
	prefill_params.src_h = src_h;