diff --git a/open-amp/lib/remoteproc/remoteproc.c b/open-amp/lib/remoteproc/remoteproc.c index eef3197e5f3..d7e33517494 100644 --- a/open-amp/lib/remoteproc/remoteproc.c +++ b/open-amp/lib/remoteproc/remoteproc.c @@ -6,6 +6,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include #include #include #include @@ -300,7 +301,7 @@ void remoteproc_init_mem(struct remoteproc_mem *mem, const char *name, if (!mem || !io || size == 0) return; if (name) - strncpy(mem->name, name, sizeof(mem->name)); + (void)strlcpy(mem->name, name, sizeof(mem->name)); else mem->name[0] = 0; mem->pa = pa;