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

Commit 9dfc1211 authored by Dedy Lansky's avatar Dedy Lansky Committed by Gerrit - the friendly Code Review server
Browse files

wil6210: fix printout in wil_read_pmccfg



Replace sprintf with snprintf which checks the destination buffer
size.

Change-Id: I7d602a59659aeb61c1ef8c4f0c8cf3dee0128863
Signed-off-by: default avatarDedy Lansky <dlansky@codeaurora.org>
parent 4a6d5df1
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -972,8 +972,7 @@ static ssize_t wil_read_pmccfg(struct file *file, char __user *user_buf,
	" - \"free\" to free memory allocated for pmc\n";

	snprintf(text, sizeof(text), "Last command status: %d\n\n%s",
		 wil_pmc_last_cmd_status(wil),
		 help);
		 wil_pmc_last_cmd_status(wil), help);

	return simple_read_from_buffer(user_buf, count, ppos, text,
				       strlen(text) + 1);