X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=drivers%2Fcrypto%2Focteontx%2Fotx_cryptodev_hw_access.c;h=18f2e6b154b42741fd764e774490c0c721552111;hb=refs%2Ftags%2Fupstream%2F18.11-rc3;hp=5e705a8313d7efab38708cc30c3f5fe3562ab860;hpb=88fab00d4402af240c1b7cc2566133aece115488;p=deb_dpdk.git diff --git a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c index 5e705a83..18f2e6b1 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c +++ b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "otx_cryptodev_hw_access.h" #include "otx_cryptodev_mbox.h" @@ -366,7 +367,9 @@ otx_cpt_hw_init(struct cpt_vf *cptvf, void *pdev, void *reg_base, char *name) /* Bar0 base address */ cptvf->reg_base = reg_base; - strncpy(cptvf->dev_name, name, 32); + + /* Save device name */ + strlcpy(cptvf->dev_name, name, (sizeof(cptvf->dev_name))); cptvf->pdev = pdev;