]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Copy ftrace_graph_filter boot param using strlcpy
authorFrederic Weisbecker <fweisbec@gmail.com>
Wed, 14 Oct 2009 18:43:39 +0000 (20:43 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Wed, 14 Oct 2009 18:43:39 +0000 (20:43 +0200)
commit3c2834506da4e2af7638485dcb3722a86e7103fc
tree04b8735f670570d146c0c12bb403effc94e14346
parent208963af3c4b899284d77e323d242f6379377a49
ftrace: Copy ftrace_graph_filter boot param using strlcpy

We are using strncpy in the wrong way to copy the ftrace_graph_filter
boot param because we pass the buffer size instead of the max string
size it can contain (buffer size - 1). The end result might not be
NULL terminated as we are abusing the max string size.

Lets use strlcpy() instead.

Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ftrace.c