Opened 5 months ago

Closed 5 months ago

#1169 closed Bug Report (fixed)

BadValues in x11_in_gtk{2,3}, and fix

Reported by: jpcima Owned by: dave
Priority: major Component: Suil
Keywords: Cc:

Description

In each of the files x11_in_gtk{2,3}.c, you have the following code:

		XSizeHints hints;
		XGetNormalHints(GDK_WINDOW_XDISPLAY(window),
		                (Window)socket->instance->ui_widget,
		                &hints);

On occasion, the result of this function will result in X11 triggering BadValue? errors because XSizeHints is not initialized.

This problem is evidenced by a Valgrind report.

==32198== Conditional jump or move depends on uninitialised value(s)
==32198==    at 0x1ABBFEF0: forward_size_request (x11_in_gtk3.c:220)
==32198==    by 0x1ABBFEF0: suil_x11_on_size_allocate (x11_in_gtk3.c:282)
==32198==    by 0x7F88F74: g_closure_invoke (in /usr/lib/libgobject-2.0.so.0.5200.1)
==32198==    by 0x7F9AF81: ??? (in /usr/lib/libgobject-2.0.so.0.5200.1)

I am no longer able to trigger a BadValue? after initializing the structure.

		XSizeHints hints = {};

Change History (1)

comment:1 Changed 5 months ago by dave

  • Resolution set to fixed
  • Status changed from new to closed

Fixed, thanks.

Note: See TracTickets for help on using tickets.