DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, bruce.richardson@intel.com,
	harry.van.haaren@intel.com, hemant.agrawal@nxp.com,
	gage.eads@intel.com, nipun.gupta@nxp.com,
	gprathyusha@caviumnetworks.com,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	stable@dpdk.org
Subject: [dpdk-dev]  [PATCH 1/2] app/testeventdev: fix string overflow
Date: Mon, 31 Jul 2017 15:34:51 +0530	[thread overview]
Message-ID: <20170731100452.12647-1-jerin.jacob@caviumnetworks.com> (raw)

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

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 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

             reply	other threads:[~2017-07-31 10:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 10:04 Jerin Jacob [this message]
2017-07-31 10:04 ` [dpdk-dev] [PATCH 2/2] app/testeventdev: fix a divide by zero case Jerin Jacob
2017-07-31 10:09   ` Van Haaren, Harry
2017-07-31 10:08 ` [dpdk-dev] [PATCH 1/2] app/testeventdev: fix string overflow Van Haaren, Harry
2017-07-31 20:41   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170731100452.12647-1-jerin.jacob@caviumnetworks.com \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=gprathyusha@caviumnetworks.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=nipun.gupta@nxp.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).