Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9814a875 authored by Chen Gang's avatar Chen Gang Committed by Greg Kroah-Hartman
Browse files

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: default avatarChen Gang <gang.chen@asianux.com>
Cc: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ec7e0aef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;