all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Dan Nicolaescu <dann@gnu.org>
Cc: 9901-done@debbugs.gnu.org
Subject: bug#9901: xg_win_to_widget uninitialized access
Date: Sun, 30 Oct 2011 18:32:16 +0100	[thread overview]
Message-ID: <1FE344F8-B368-410D-A5B5-14BECB35345E@swipnet.se> (raw)
In-Reply-To: <yxqvcr8o8wp.fsf@fencepost.gnu.org>

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	other threads:[~2011-10-30 17:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-29  1:59 bug#9901: xg_win_to_widget uninitialized access Dan Nicolaescu
2011-10-30 17:32 ` Jan Djärv [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1FE344F8-B368-410D-A5B5-14BECB35345E@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=9901-done@debbugs.gnu.org \
    --cc=dann@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.