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

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

Merge "msm: camera: Prevent buffer overread in write_logsync."

parents 413d1c29 1240d01e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1288,7 +1288,7 @@ static ssize_t write_logsync(struct file *file, const char __user *buf,
	uint64_t seq_num = 0;
	int ret;

	if (copy_from_user(lbuf, buf, sizeof(lbuf)))
	if (copy_from_user(lbuf, buf, sizeof(lbuf) - 1))
		return -EFAULT;

	ret = sscanf(lbuf, "%llu", &seq_num);