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

Commit 60cdb527 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Fix out of bound read access in pipe_lookup"

parents d2b425ea be23453d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1338,10 +1338,11 @@ static struct mdss_mdp_pipe *__pipe_lookup(struct mdss_mdp_pipe *pipe_list,
		bool (*cmp)(struct mdss_mdp_pipe *, void *), void *data)
{
	struct mdss_mdp_pipe *pipe;
	int i, j;
	int i, j, max_rects;

	for (i = 0, pipe = pipe_list; i < count; i++) {
		for (j = 0; j < pipe->multirect.max_rects; j++, pipe++)
		max_rects = pipe->multirect.max_rects;
		for (j = 0; j < max_rects; j++, pipe++)
			if ((rect_num == pipe->multirect.num) &&
					cmp(pipe, data))
				return pipe;