summaryrefslogtreecommitdiffstats
path: root/samples/seccomp/bpf-fancy.c
diff options
context:
space:
mode:
authorZhao Hongjiang <zhaohongjiang@huawei.com>2013-06-20 13:05:40 +0200
committerSteven Rostedt <rostedt@goodmis.org>2014-07-01 13:13:33 +0200
commitd8fae2f64433cbe7f0389f965081348272b61ff9 (patch)
tree96876cac1d8b42772d6135e199fc6e88acb36bcb /samples/seccomp/bpf-fancy.c
parentftrace: Add trampolines to enabled_functions debug file (diff)
downloadlinux-d8fae2f64433cbe7f0389f965081348272b61ff9.tar.xz
linux-d8fae2f64433cbe7f0389f965081348272b61ff9.zip
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/51C2E204.1080501@huawei.com Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'samples/seccomp/bpf-fancy.c')
0 files changed, 0 insertions, 0 deletions