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: Jeevan Shriram <jshriram@codeaurora.org>
This commit is contained in:
parent
07c71c6ce4
commit
2a6a83e5be
1 changed files with 2 additions and 2 deletions
|
@ -3919,8 +3919,8 @@ static int mdss_fb_atomic_commit_ioctl(struct fb_info *info,
|
||||||
|
|
||||||
if (layer_count) {
|
if (layer_count) {
|
||||||
for (j = 0; j < layer_count; j++) {
|
for (j = 0; j < layer_count; j++) {
|
||||||
rc = copy_to_user(&input_layer_list[i].error_code,
|
rc = copy_to_user(&input_layer_list[j].error_code,
|
||||||
&layer_list[i].error_code, sizeof(int));
|
&layer_list[j].error_code, sizeof(int));
|
||||||
if (rc)
|
if (rc)
|
||||||
pr_err("layer error code copy to user failed\n");
|
pr_err("layer error code copy to user failed\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue