From: Taras Chornyi Date: Mon, 6 Mar 2017 16:52:49 +0000 (+0000) Subject: Increase devname buffer buffer to ensure that snprintf output X-Git-Tag: collectd-5.8.0~209^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=37b665223a5e8d25cf9a9411f8266106be9024e4;p=collectd.git Increase devname buffer buffer to ensure that snprintf output would not be truncated before the last format character Signed-off-by: Taras Chornyi --- diff --git a/src/ovs_stats.c b/src/ovs_stats.c index 7d775284..1641e875 100644 --- a/src/ovs_stats.c +++ b/src/ovs_stats.c @@ -875,7 +875,7 @@ static int ovs_stats_plugin_init(void) { static int ovs_stats_plugin_read(__attribute__((unused)) user_data_t *ud) { bridge_list_t *bridge; port_list_t *port; - char devname[PORT_NAME_SIZE_MAX]; + char devname[PORT_NAME_SIZE_MAX * 2]; pthread_mutex_lock(&g_stats_lock); for (bridge = g_bridge_list_head; bridge != NULL; bridge = bridge->next) {