crypto/nitrox: fix oversized device name
authorNagadheeraj Rottela <rnagadheeraj@marvell.com>
Fri, 27 Mar 2020 13:42:39 +0000 (19:12 +0530)
committerAkhil Goyal <akhil.goyal@oss.nxp.com>
Sun, 5 Apr 2020 16:36:17 +0000 (18:36 +0200)
commit9614b472a3af771f68ba4f99a034de3b4da99ef7
treeb32553502229c3427e72f8b4837cf24af992e3f6
parent76522b25b15316400aab26cc8187e19397998f53
crypto/nitrox: fix oversized device name

In nitrox_sym_pmd_create() the name array will overflow if the pci
device name is greater than 57 bytes. To fix this issue subtract pci
device name length from array length while appending substring to the
name.

Coverity issue: 349926
Fixes: 9fdef0cc2385 ("crypto/nitrox: create symmetric cryptodev")
Cc: stable@dpdk.org
Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
drivers/crypto/nitrox/nitrox_sym.c