[gtk/matthiasc/for-master] widget: Avoid uninitialized access



commit 2d7a9bd2af1dab4cd205330bc72def2c52b6eaee
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jun 28 11:24:09 2020 -0400

    widget: Avoid uninitialized access
    
    Initialize all field in the GtkCrossingData struct
    when synthesizing crossing events.
    
    Fixes: #2743

 gtk/gtkwidget.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 857aa9ac62..1134e4a979 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7539,9 +7539,11 @@ _gtk_widget_synthesize_crossing (GtkWidget       *from,
   g_return_if_fail (from != NULL || to != NULL);
 
   crossing.type = GTK_CROSSING_POINTER;
+  crossing.mode = mode;
   crossing.old_target = from;
+  crossing.old_descendent = NULL;
   crossing.new_target = to;
-  crossing.mode = mode;
+  crossing.new_descendent = NULL;
 
   if (from)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]