From: Jerin Jacob Date: Mon, 31 Jul 2017 10:04:51 +0000 (+0530) Subject: app/testeventdev: fix string overflow in parsing X-Git-Tag: spdx-start~2275 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=30005d09264ed50f6beaec6b80b987dbc27e3607 app/testeventdev: fix string overflow in parsing Coverity issue: 158660 Fixes: 4afd440ec132 ("app/testeventdev: update options through command line") Cc: stable@dpdk.org Signed-off-by: Jerin Jacob Acked-by: Harry van Haaren --- diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c index dbab8ea618..65e22f8450 100644 --- a/app/test-eventdev/evt_options.c +++ b/app/test-eventdev/evt_options.c @@ -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; }