commit 316e93c7dbdb555c7262033b73e0f3fb0d960efb
Author: Timm Bäder <mail@baedert.org>
Date:   Thu Mar 30 09:00:13 2017 +0200

    box: Initialize size arrays to 0
    
    We skip the later gtk_widget_get_preferred_foobar calls if the widget is
    invisible, so we don't initialize some of the array entries. Luckily, 0
    is both the width and height of an invisible widget.

diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index e39eb495a5..65f0f535db 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -521,6 +521,7 @@ gtk_box_size_allocate_no_center (GtkWidget           *widget,
 
   direction = gtk_widget_get_direction (widget);
   sizes = g_newa (GtkRequestedSize, nvis_children);
+  memset (sizes, 0, nvis_children * sizeof (GtkRequestedSize));
 
   if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
     size = allocation->width - (nvis_children - 1) * private->spacing;
@@ -1220,7 +1221,7 @@ gtk_box_size_allocate (GtkWidget     *widget,
                            allocation,
                            gtk_widget_get_allocated_baseline (widget),
                            &clip);
-  
+
   gtk_widget_set_clip (widget, &clip);
 }
 
@@ -1763,6 +1764,7 @@ gtk_box_compute_size_for_opposing_orientation (GtkBox *box,
     return;
 
   sizes = g_newa (GtkRequestedSize, nvis_children);
+  memset (sizes, 0, nvis_children * sizeof (GtkRequestedSize));
   size = avail_size - (nvis_children - 1) * private->spacing;
 
   /* Retrieve desired size for visible children */
