From 1fa33c8280426163249b149843b2dbcdb0471ec3 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Wed, 21 Mar 2018 15:33:00 +0000 Subject: [PATCH] dpdk: increase buffer size for parsing lcores This commit increases the size of the "high_str" buffer, which is later used by the strncpy() function. Static analysis showed that there was a potential issue in accessing this string if the buffer is smaller. Signed-off-by: Harry van Haaren --- src/utils_dpdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils_dpdk.c b/src/utils_dpdk.c index 30a10574..e6764876 100644 --- a/src/utils_dpdk.c +++ b/src/utils_dpdk.c @@ -831,7 +831,7 @@ uint128_t str_to_uint128(const char *str, int len) { return lcore_mask; } else { char low_str[DATA_MAX_NAME_LEN]; - char high_str[DATA_MAX_NAME_LEN]; + char high_str[DATA_MAX_NAME_LEN*2]; memset(high_str, 0, sizeof(high_str)); memset(low_str, 0, sizeof(low_str)); -- 2.11.0