]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/gtk+/gtk+-2.6.10/unbreak-gdkproperty-x11-c.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / gtk+ / gtk+-2.6.10 / unbreak-gdkproperty-x11-c.patch
1 --- gtk+-2.6.10/gdk/x11/gdkproperty-x11.c.orig  2005-08-18 16:10:56.000000000 +0200
2 +++ gtk+-2.6.10/gdk/x11/gdkproperty-x11.c       2006-04-08 23:37:06.000000000 +0200
3 @@ -493,7 +493,6 @@
4    gint ret_format;
5    gulong ret_nitems;
6    gulong ret_bytes_after;
7 -  gulong get_length;
8    gulong ret_length;
9    guchar *ret_data;
10    Atom xproperty;
11 @@ -522,30 +521,9 @@
12  
13    ret_data = NULL;
14    
15 -  /* 
16 -   * Round up length to next 4 byte value.  Some code is in the (bad?)
17 -   * habit of passing G_MAXLONG as the length argument, causing an
18 -   * overflow to negative on the add.  In this case, we clamp the
19 -   * value to G_MAXLONG.
20 -   */
21 -  get_length = length + 3;
22 -  if (get_length > G_MAXLONG)
23 -    {
24 -      g_warning ("gdk_property_get(): length value has wrapped in calculation "
25 -                "(did you pass G_MAXLONG?)");
26 -      get_length = G_MAXLONG;
27 -    }
28 -  /* To fail, either the user passed 0 or G_MAXULONG */
29 -  get_length = get_length / 4;
30 -  if (get_length == 0)
31 -    {
32 -      g_warning ("gdk_propery-get(): invalid length 0");
33 -      return FALSE;
34 -    }
35 -
36    res = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display),
37                             GDK_WINDOW_XWINDOW (window), xproperty,
38 -                           offset, get_length, pdelete,
39 +                           offset, (length + 3) / 4, pdelete,
40                             xtype, &ret_prop_type, &ret_format,
41                             &ret_nitems, &ret_bytes_after,
42                             &ret_data);