Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tracing: Change trace event sample to use strlcpy instead of strncpy
Strings should be copied with strlcpy instead of strncpy when they will later be printed via %s. This guarantees that they terminate with a NUL '\0' character and do not run pass the end of the allocated string. This is only for sample code, but it should stil represent a good role model. Link: http://lkml.kernel.org/p/[email protected] Signed-off-by: Zhao Hongjiang <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
- Loading branch information