disp: msm: dsi: add check for buffer length before copy
The change adds a check to make sure the length of bytes being copied don't exceed the size of the destination buffer causing an overflow. Change-Id: Ib3ca3705e4179ccda1af11279e96e167baee6a3b Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
这个提交包含在:
@@ -1120,6 +1120,9 @@ static ssize_t debugfs_dump_info_read(struct file *file,
|
||||
"\tClock master = %s\n",
|
||||
display->ctrl[display->clk_master_idx].ctrl->name);
|
||||
|
||||
if (len > user_len)
|
||||
len = user_len;
|
||||
|
||||
if (copy_to_user(user_buf, buf, len)) {
|
||||
kfree(buf);
|
||||
return -EFAULT;
|
||||
|
在新工单中引用
屏蔽一个用户