mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
Merge "disp: msm: dsi: add check before buffer copy"
This commit is contained in:
commit
c9c060d40c
1 changed files with 2 additions and 2 deletions
|
|
@ -116,7 +116,7 @@ static ssize_t debugfs_state_info_read(struct file *file,
|
|||
dsi_ctrl->clk_freq.pix_clk_rate,
|
||||
dsi_ctrl->clk_freq.esc_clk_rate);
|
||||
|
||||
/* TODO: make sure that this does not exceed 4K */
|
||||
len = min_t(size_t, len, SZ_4K);
|
||||
if (copy_to_user(buff, buf, len)) {
|
||||
kfree(buf);
|
||||
return -EFAULT;
|
||||
|
|
@ -172,7 +172,7 @@ static ssize_t debugfs_reg_dump_read(struct file *file,
|
|||
}
|
||||
|
||||
|
||||
/* TODO: make sure that this does not exceed 4K */
|
||||
len = min_t(size_t, len, SZ_4K);
|
||||
if (copy_to_user(buff, buf, len)) {
|
||||
kfree(buf);
|
||||
return -EFAULT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue