perf: Fix strncpy() use, always make sure it's NUL terminated
authorChen Gang <gang.chen@asianux.com>
Mon, 8 Apr 2013 03:48:27 +0000 (11:48 +0800)
committerIngo Molnar <mingo@kernel.org>
Mon, 8 Apr 2013 11:26:55 +0000 (13:26 +0200)
For NUL terminated string, always make sure that there's '\0' at the end.

In our case we need a return value, so still use strncpy() and
fix up the tail explicitly.

(strlcpy() returns the size, not the pointer)

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: a.p.zijlstra@chello.nl <a.p.zijlstra@chello.nl>
Cc: paulus@samba.org <paulus@samba.org>
Cc: acme@ghostprotocols.net <acme@ghostprotocols.net>
Link: http://lkml.kernel.org/r/51623E0B.7070101@asianux.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

No differences found