git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a74640c
)
net/nfp: fix strncpy misuse
author
Andy Green
<andy@warmcat.com>
Mon, 14 May 2018 05:00:22 +0000
(13:00 +0800)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Mon, 14 May 2018 21:32:23 +0000
(23:32 +0200)
Fixes:
c7e9729da6b5
("net/nfp: support CPP")
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Tested-by: Alejandro Lucero <alejandro.lucero@netronome.com>
drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
patch
|
blob
|
history
diff --git
a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
index
4e6c666
..
52b2948
100644
(file)
--- 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);
- str
ncpy(desc->busdev, devname, strlen(devname
));
+ str
lcpy(desc->busdev, devname, sizeof(desc->busdev
));
ret = nfp_acquire_process_lock(desc);
if (ret)