ethdev: fix coverity issue
Checks
Commit Message
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(+)
Comments
On 2/27/2024 7:38 PM, Harman Kalra wrote:
> Fixing uninitialized value access.
>
> Coverity issue: 414934
> Fixes: 9a9eb104edf6 ("ethdev: parse multiple representor devargs")
>
> Signed-off-by: Harman Kalra <hkalra@marvell.com>
>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Applied to dpdk-next-net/main, thanks.
@@ -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) {