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

Commit 5d2ca94b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents cecc12c6 f198a02d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ static ssize_t debugfs_state_info_read(struct file *file,
	if (len > count)
		len = count;

	/* 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;
@@ -182,7 +182,7 @@ static ssize_t debugfs_reg_dump_read(struct file *file,
	if (len > count)
		len = count;

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