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

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

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

parents 32fb69cf eb308a57
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1522,6 +1522,7 @@ static ssize_t _sde_debugfs_conn_cmd_tx_sts_read(struct file *file,
		return 0;
	}

	blen = min_t(size_t, MAX_CMD_PAYLOAD_SIZE, count);
	if (copy_to_user(buf, buffer, blen)) {
		SDE_ERROR("copy to user buffer failed\n");
		return -EFAULT;
+2 −0
Original line number Diff line number Diff line
@@ -1218,6 +1218,7 @@ static ssize_t _sde_debugfs_mode_ctrl_read(struct file *file, char __user *buf,
	if (blen <= 0)
		return 0;

	blen = min_t(size_t, MAX_BUFFER_SIZE, count);
	if (copy_to_user(buf, buffer, blen))
		return -EFAULT;

@@ -1311,6 +1312,7 @@ static ssize_t _sde_debugfs_vsync_mode_read(struct file *file, char __user *buf,
	if (blen <= 0)
		return 0;

	blen = min_t(size_t, MAX_BUFFER_SIZE, count);
	if (copy_to_user(buf, buffer, blen))
		return -EFAULT;