bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#9901: xg_win_to_widget uninitialized access


From: Jan Djärv
Subject: bug#9901: xg_win_to_widget uninitialized access
Date: Sun, 30 Oct 2011 18:32:16 +0100

Fixed.

        Jan D.

29 okt 2011 kl. 03:59 skrev Dan Nicolaescu:

> valgrind gives a warning for an uninitialized access in
> xg_win_to_widget for the gtk_get_event_widget call.
> 
> 
> if (gdkwin)
>    {
>      GdkEvent event;
>      event.any.window = gdkwin;
>      gwdesc = gtk_get_event_widget (&event);
>    }
> 
> gtk_get_event_widget is (in gtk3):
> 
> GtkWidget*
> gtk_get_event_widget (GdkEvent *event)
> {
>  GtkWidget *widget;
>  gpointer widget_ptr;
> 
>  widget = NULL;
>  if (event && event->any.window &&
>      (event->type == GDK_DESTROY || !gdk_window_is_destroyed
>  (event->any.window)))
>    {
>      gdk_window_get_user_data (event->any.window, &widget_ptr);
>      widget = widget_ptr;
>    }
> 
>  return widget;
> }
> 
> so indeed event->type is uninitialized.
> 
> 
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]