]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Make sure variable string fields are NULL-terminated
authorTom Zanussi <tom.zanussi@linux.intel.com>
Wed, 28 Mar 2018 20:10:56 +0000 (15:10 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 6 Apr 2018 12:56:50 +0000 (08:56 -0400)
commit133333a41895b9016da39444ddae57f34797a206
treed38131cc0ac81f73a0daeb9625d384e7821133be
parentfac6d7f8f9af8855f7aa39bdeb9e631fc2a399c1
tracing: Make sure variable string fields are NULL-terminated

The strncpy() currently being used for variable string fields can
result in a lack of termination if the string length is equal to the
field size.  Use the safer strscpy() instead, which will guarantee
termination.

Link: http://lkml.kernel.org/r/fb97c1e518fb358c12a4057d7445ba2c46956cd7.1522256721.git.tom.zanussi@linux.intel.com
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c