Increase devname buffer buffer to ensure that snprintf output
authorTaras Chornyi <tarasx.chornyi@intel.com>
Mon, 6 Mar 2017 16:52:49 +0000 (16:52 +0000)
committerTaras Chornyi <tarasx.chornyi@intel.com>
Mon, 6 Mar 2017 16:52:49 +0000 (16:52 +0000)
would not be truncated before the last format character

Signed-off-by: Taras Chornyi <tarasx.chornyi@intel.com>
src/ovs_stats.c

index 7d77528..1641e87 100644 (file)
@@ -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) {