trace: resolve stack corruption due to string copy
authorAmey Telawane <ameyt@codeaurora.org>
Sun, 16 Apr 2017 17:37:32 +0000 (22:37 +0530)
committerManish Tuteja <mtuteja@nvidia.com>
Tue, 18 Apr 2017 21:25:18 +0000 (14:25 -0700)
commit31181e12cc26953993314db7e493c1d545ef176e
treeaa0d36d41fd4380a37b3f8af6f651967525c9cb2
parentd4077427aa5ccb3f0538fd6301b7b722c41af321
trace: resolve stack corruption due to string copy

Strcpy has no limit on string being copied which causes
stack corruption leading to kernel panic. Use strlcpy to
resolve the issue by providing length of string to be copied.

Bug 1899974

CRs-fixed: 1048480
Change-Id: Ib290b25f7e0ff96927b8530e5c078869441d409f
Signed-off-by: Amey Telawane <ameyt@codeaurora.org>
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1463510
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
kernel/trace/trace.c