Commit bb279057 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Zero out some stack-allocated X structures, to avoid valgrind warnings

2006-08-15  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkdnd-x11.c (gdk_window_register_dnd):
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_decorations):
        (gdk_window_set_functions): Zero out some stack-allocated
        X structures, to avoid valgrind warnings about uninitialized
        memory.  (#349382, David Baron)
parent e4f6c9d4
2006-08-15 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkdnd-x11.c (gdk_window_register_dnd):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_decorations):
(gdk_window_set_functions): Zero out some stack-allocated
X structures, to avoid valgrind warnings about uninitialized
memory. (#349382, David Baron)
2006-08-14 Emmanuele Bassi <ebassi@gnome.org> 2006-08-14 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchooser.c: * gtk/gtkrecentchooser.c:
......
2006-08-15 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkdnd-x11.c (gdk_window_register_dnd):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_decorations):
(gdk_window_set_functions): Zero out some stack-allocated
X structures, to avoid valgrind warnings about uninitialized
memory. (#349382, David Baron)
2006-08-14 Emmanuele Bassi <ebassi@gnome.org> 2006-08-14 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchooser.c: * gtk/gtkrecentchooser.c:
......
...@@ -3754,6 +3754,8 @@ gdk_window_register_dnd (GdkWindow *window) ...@@ -3754,6 +3754,8 @@ gdk_window_register_dnd (GdkWindow *window)
motif_drag_receiver_info_atom = gdk_x11_get_xatom_by_name_for_display (display, motif_drag_receiver_info_atom = gdk_x11_get_xatom_by_name_for_display (display,
"_MOTIF_DRAG_RECEIVER_INFO"); "_MOTIF_DRAG_RECEIVER_INFO");
/* initialize to zero to avoid writing uninitialized data to socket */
memset(&info, 0, sizeof(info));
info.byte_order = local_byte_order; info.byte_order = local_byte_order;
info.protocol_version = 0; info.protocol_version = 0;
info.protocol_style = XmDRAG_DYNAMIC; info.protocol_style = XmDRAG_DYNAMIC;
......
...@@ -5021,6 +5021,8 @@ gdk_window_set_decorations (GdkWindow *window, ...@@ -5021,6 +5021,8 @@ gdk_window_set_decorations (GdkWindow *window,
g_return_if_fail (GDK_IS_WINDOW (window)); g_return_if_fail (GDK_IS_WINDOW (window));
/* initialize to zero to avoid writing uninitialized data to socket */
memset(&hints, 0, sizeof(hints));
hints.flags = MWM_HINTS_DECORATIONS; hints.flags = MWM_HINTS_DECORATIONS;
hints.decorations = decorations; hints.decorations = decorations;
...@@ -5089,6 +5091,8 @@ gdk_window_set_functions (GdkWindow *window, ...@@ -5089,6 +5091,8 @@ gdk_window_set_functions (GdkWindow *window,
g_return_if_fail (GDK_IS_WINDOW (window)); g_return_if_fail (GDK_IS_WINDOW (window));
/* initialize to zero to avoid writing uninitialized data to socket */
memset(&hints, 0, sizeof(hints));
hints.flags = MWM_HINTS_FUNCTIONS; hints.flags = MWM_HINTS_FUNCTIONS;
hints.functions = functions; hints.functions = functions;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment