Thread (5 messages) 5 messages, 3 authors, 2017-07-31
STALE3282d

[PATCH 1/2] app/testeventdev: fix string overflow

From: Jerin Jacob <hidden>
Date: 2017-07-31 10:04:51
Subsystem: the rest · Maintainer: Linus Torvalds

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

Signed-off-by: Jerin Jacob <redacted>
---
 app/test-eventdev/evt_options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c
index dbab8ea61..65e22f845 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;
 }
 
-- 
2.13.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help