X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fip_pipeline%2Fkni.c;h=7e5ff0543a35339bccdb4b85545ba744b8c23c81;hb=833e36b870d0c1074aab610bca7d8c8e15af329b;hp=ed5f8942e21869e90b5268e369cfc1971a611833;hpb=a9dbe180222680edf8c49e86791f972549ce5be3;p=dpdk.git diff --git a/examples/ip_pipeline/kni.c b/examples/ip_pipeline/kni.c index ed5f8942e2..7e5ff0543a 100644 --- a/examples/ip_pipeline/kni.c +++ b/examples/ip_pipeline/kni.c @@ -7,6 +7,7 @@ #include #include +#include #include "kni.h" #include "mempool.h" @@ -153,7 +154,7 @@ kni_create(const char *name, struct kni_params *params) return NULL; /* Node fill in */ - strncpy(kni->name, name, sizeof(kni->name)); + strlcpy(kni->name, name, sizeof(kni->name)); kni->k = k; /* Node add to list */