crypto/scheduler: fix strncpy
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Mon, 29 Jan 2018 09:22:02 +0000 (09:22 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 31 Jan 2018 17:59:39 +0000 (18:59 +0100)
commit6af3b03547d7499e8875f7e32effba172140bbfe
treead7685f8e6e5702d32daf0b267cec9b31f1d0df6
parent200d0e7a708c8a99e1e4b8fe98d56f368d3b6187
crypto/scheduler: fix strncpy

The coverity issue was not completely fixed, since strncpy
should not be called with max length.
Instead, snprintf is used as a safer option.

Coverity issue: 143431
Fixes: d040aca67170 ("crypto/scheduler: fix strings not null terminated")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
drivers/crypto/scheduler/rte_cryptodev_scheduler.c