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

Commit 159cb362 authored by Jeevan Shriram's avatar Jeevan Shriram
Browse files

msm: mdss: fix the input layer and layer list array index



In the current implementation, wrong memory is being referenced while
copying to user. Correct the input layer and layer list array index
to avoid invalid memory access.

CRs-Fixed: 882379
Change-Id: I47790d1c5419c099ce32727c28e5e6e7e742f18f
Signed-off-by: default avatarJeevan Shriram <jshriram@codeaurora.org>
parent 77813844
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3923,8 +3923,8 @@ static int mdss_fb_atomic_commit_ioctl(struct fb_info *info,

	if (layer_count) {
		for (j = 0; j < layer_count; j++) {
			rc = copy_to_user(&input_layer_list[i].error_code,
					&layer_list[i].error_code, sizeof(int));
			rc = copy_to_user(&input_layer_list[j].error_code,
					&layer_list[j].error_code, sizeof(int));
			if (rc)
				pr_err("layer error code copy to user failed\n");
		}