tracing: Use strncpy instead of memcpy when copying comm in trace.c

Because there may be random garbage beyond a string's null terminator,
code that might use the entire comm array e.g. histogram keys, can
give unexpected results if that garbage is copied in too, so avoid
that possibility by using strncpy instead of memcpy.

Signed-off-by: Tom Zanussi <>
Suggested-by: Steven Rostedt (VMware) <>
1 file changed