On Wed, May 9, 2018 at 2:31 AM, Andy Green <a...@warmcat.com> wrote:
> Signed-off-by: Andy Green <a...@warmcat.com> > --- > drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c > b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c > index 4e6c66624..52b294888 100644 > --- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c > +++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c > @@ -31,6 +31,8 @@ > #include <sys/file.h> > #include <sys/stat.h> > > +#include <rte_string_fns.h> > + > #include "nfp_cpp.h" > #include "nfp_target.h" > #include "nfp6000/nfp6000.h" > @@ -846,7 +848,7 @@ nfp6000_init(struct nfp_cpp *cpp, const char *devname) > > > memset(desc->busdev, 0, BUSDEV_SZ); > - strncpy(desc->busdev, devname, strlen(devname)); > + strlcpy(desc->busdev, devname, sizeof(desc->busdev)); > > ret = nfp_acquire_process_lock(desc); > if (ret) > > Acked-by: Alejandro Lucero <alejandro.luc...@netronome.com> Tested-by: Alejandro Lucero <alejandro.luc...@netronome.com>