crypto/octeontx: fix non null terminated device name
authorAnoob Joseph <anoob.joseph@caviumnetworks.com>
Mon, 12 Nov 2018 18:14:12 +0000 (18:14 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 14 Nov 2018 03:32:48 +0000 (04:32 +0100)
commitacbaf3cedcc783966f1187949a426996bb9072f1
treec62f2314a2a1b686b2cf9bfb1f575108572ea016
parent1fd1aa0c91bf138a4e7f6f7ce60c8d850da73564
crypto/octeontx: fix non null terminated device name

If the length of string pointed by 'name' is equal to or greater than
the sizeof cptvf->dev_name string, the resultant string will not be
null terminated. Using strlcpy would make sure the string would always
be null terminated.

Coverity Issue: 323492
Fixes: 0dc1cffa4d33 ("crypto/octeontx: add hardware init routine")

Signed-off-by: Ankur Dwivedi <ankur.dwivedi@caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
drivers/crypto/octeontx/otx_cryptodev_hw_access.c