drivers/crypto: use snprintf return value correctly
authorTomasz Duszynski <tdu@semihalf.com>
Wed, 11 Oct 2017 11:05:07 +0000 (13:05 +0200)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 12 Oct 2017 14:22:39 +0000 (15:22 +0100)
commit6ab25e634f51b98b18bd3095cd09858c4a9489fe
treeeb4cc83677773755c9dd3ab5dbce2ea2bf5bfcfb
parentbf551c96752e56036096eea68f074245fc5fdccb
drivers/crypto: use snprintf return value correctly

snprintf return value is the length of was encoded into destination
array excluding '\0'. Thus return value equal to the length of the
destination array or more means truncation.

This commit fixes improper use of the return value.

Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations")
Fixes: 924e84f87306 ("aesni_mb: add driver for multi buffer based crypto")
Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
Fixes: 2773c86d061a ("crypto/kasumi: add driver for KASUMI library")
Fixes: 94b0ad8e0aa5 ("null_crypto: add driver for null crypto operations")
Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Fixes: 3aafc423cf4d ("snow3g: add driver for SNOW 3G library")
Fixes: cf7685d68f00 ("crypto/zuc: add driver for ZUC library")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
drivers/crypto/armv8/rte_armv8_pmd_ops.c
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
drivers/crypto/null/null_crypto_pmd_ops.c
drivers/crypto/openssl/rte_openssl_pmd_ops.c
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
drivers/crypto/zuc/rte_zuc_pmd_ops.c