app/testeventdev: fix string overflow in parsing

Coverity issue: 158660
Fixes: 4afd440ec1 ("app/testeventdev: update options through command line")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
This commit is contained in:
Jerin Jacob 2017-07-31 15:34:51 +05:30 committed by Thomas Monjalon
parent f46358207e
commit 30005d0926

View File

@ -109,7 +109,7 @@ evt_parse_queue_priority(struct evt_options *opt, const char *arg __rte_unused)
static int
evt_parse_test_name(struct evt_options *opt, const char *arg)
{
strcpy(opt->test_name, arg);
snprintf(opt->test_name, EVT_TEST_NAME_MAX_LEN, "%s", arg);
return 0;
}