From 37b665223a5e8d25cf9a9411f8266106be9024e4 Mon Sep 17 00:00:00 2001 From: Taras Chornyi Date: Mon, 6 Mar 2017 16:52:49 +0000 Subject: [PATCH] Increase devname buffer buffer to ensure that snprintf output would not be truncated before the last format character Signed-off-by: Taras Chornyi --- src/ovs_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2