summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorChaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>2019-03-18 12:36:36 +0000
committerAkhil Goyal <akhil.goyal@nxp.com>2019-03-22 15:54:24 +0100
commite3b91a3ef236b3bb6ee4db12cc285e8f87b942e7 (patch)
tree4b5c161839ab91d6194b60104ff44970f1dad0ba /app
parentf4797bae00502b9fd3db0bae80cd933f69b33060 (diff)
downloaddpdk-next-eventdev-e3b91a3ef236b3bb6ee4db12cc285e8f87b942e7.zip
dpdk-next-eventdev-e3b91a3ef236b3bb6ee4db12cc285e8f87b942e7.tar.gz
dpdk-next-eventdev-e3b91a3ef236b3bb6ee4db12cc285e8f87b942e7.tar.xz
test/crypto: fix possible overflow using strlcat
strcat does not check the destination length and there might be chances of string overflow so instead of strcat, strlcat is used. Fixes: 6f4eec2565 ("test/crypto: enhance scheduler unit tests") Cc: stable@dpdk.org Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Diffstat (limited to 'app')
-rw-r--r--app/test/test_cryptodev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 32f1893..2ff2041 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -15,6 +15,7 @@
#include <rte_crypto.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
+#include <rte_string_fns.h>
#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
#include <rte_cryptodev_scheduler.h>
@@ -375,7 +376,7 @@ testsuite_setup(void)
snprintf(vdev_args, sizeof(vdev_args),
"%s%d", temp_str, i);
strcpy(temp_str, vdev_args);
- strcat(temp_str, ";");
+ strlcat(temp_str, ";", sizeof(temp_str));
slave_core_count++;
socket_id = lcore_config[i].socket_id;
}