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

Commit 0f2a4261 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "disp: msm: dsi: add check before buffer copy"

parents 5ffa8a86 be317127
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -118,7 +118,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;
@@ -173,8 +173,7 @@ static ssize_t debugfs_reg_dump_read(struct file *file,
		return rc;
	}


	/* 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;