diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-01-21 17:35:00 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-21 14:00:10 -0800 |
commit | 9814a8750e7af236030c237a98bba79f5eb3c214 (patch) | |
tree | 3ccc5ae423dda76f2a2494e464353ad946b9c1f8 /drivers/staging/tidspbridge | |
parent | ec7e0aef31e2eece787f7c49df1f031f2a983265 (diff) |
staging: tidspbridge/pmgr: use strlcpy instead of strncpy
The fields must be null-terminated,
or next strcpy in dbll_find_dsp_symbol, will cause issue
additoinal info:
dbll_find_dsp_symbol call find_symbol_callback to get name.
and then call strcpy to copy the name to upper caller.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/tidspbridge')
-rw-r--r-- | drivers/staging/tidspbridge/pmgr/dbll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c index 9f07036cd411..c191ae203565 100644 --- a/drivers/staging/tidspbridge/pmgr/dbll.c +++ b/drivers/staging/tidspbridge/pmgr/dbll.c @@ -1382,7 +1382,7 @@ void find_symbol_callback(void *elem, void *user_data) offset < context->cur_best_offset) { context->cur_best_offset = offset; context->sym_addr = symbol_addr; - strncpy(context->name, symbol->name, sizeof(context->name)); + strlcpy(context->name, symbol->name, sizeof(context->name)); } return; |