From: Harry van Haaren Date: Wed, 21 Mar 2018 15:33:00 +0000 (+0000) Subject: dpdk: increase buffer size for parsing lcores X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=1fa33c8280426163249b149843b2dbcdb0471ec3 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 --- 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));