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

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

Merge "msm: mdss: information leak during buffer copy from userspace"

parents bbcba031 bb46c918
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -894,10 +894,15 @@ static ssize_t mdss_dsi_cmd_write(struct file *file, const char __user *p,


	/* Writing in batches is possible */
	/* Writing in batches is possible */
	ret = simple_write_to_buffer(string_buf, blen, ppos, p, count);
	ret = simple_write_to_buffer(string_buf, blen, ppos, p, count);
	if (ret < 0) {
		pr_err("%s: Failed to copy data\n", __func__);
		mutex_unlock(&pcmds->dbg_mutex);
		return -EINVAL;
	}


	string_buf[blen] = '\0';
	string_buf[ret] = '\0';
	pcmds->string_buf = string_buf;
	pcmds->string_buf = string_buf;
	pcmds->sblen = blen;
	pcmds->sblen = count;
	mutex_unlock(&pcmds->dbg_mutex);
	mutex_unlock(&pcmds->dbg_mutex);
	return ret;
	return ret;
}
}