DPDK patches and discussions
 help / color / mirror / Atom feed
From: Harman Kalra <hkalra@marvell.com>
To: <john.mcnamara@intel.com>, Thomas Monjalon <thomas@monjalon.net>,
	"Ferruh Yigit" <ferruh.yigit@amd.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: <dev@dpdk.org>, Harman Kalra <hkalra@marvell.com>
Subject: [PATCH] ethdev: fix coverity issue
Date: Wed, 28 Feb 2024 01:08:28 +0530	[thread overview]
Message-ID: <20240227193828.18612-1-hkalra@marvell.com> (raw)

Fixing uninitialized value access.

Coverity issue: 414934
Fixes: 9a9eb104edf6 ("ethdev: parse multiple representor devargs")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 lib/ethdev/ethdev_driver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index aecb407c05..1660dd3f2a 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -546,6 +546,7 @@ eth_dev_tokenise_representor_list(char *p_val, struct rte_eth_devargs *eth_devar
 	}
 
 	memset(str, 0, BUFSIZ);
+	memset(da_val, 0, BUFSIZ);
 	/* Remove the exterior [] of the consolidated list */
 	strncpy(str, &p_val[1], len - 2);
 	while (1) {
-- 
2.18.0


             reply	other threads:[~2024-02-27 19:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 19:38 Harman Kalra [this message]
2024-02-28 16:36 ` Ferruh Yigit

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=20240227193828.18612-1-hkalra@marvell.com \
    --to=hkalra@marvell.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=john.mcnamara@intel.com \
    --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).