[PATCH] ethdev: fix coverity issue
Harman Kalra
hkalra at marvell.com
Tue Feb 27 20:38:28 CET 2024
Fixing uninitialized value access.
Coverity issue: 414934
Fixes: 9a9eb104edf6 ("ethdev: parse multiple representor devargs")
Signed-off-by: Harman Kalra <hkalra at 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
More information about the dev
mailing list