Home
last modified time | relevance | path

Searched hist:d8fae2f6 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/samples/trace_events/
H A Dtrace-events-sample.hd8fae2f6 Thu Jun 20 06:05:40 CDT 2013 Zhao Hongjiang <zhaohongjiang@huawei.com> 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>
d8fae2f6 Thu Jun 20 06:05:40 CDT 2013 Zhao Hongjiang <zhaohongjiang@huawei.com> 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>