After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 309025 - gdk_property_get(): length value has wrapped in calculation (did you pass G_MAXLONG?)
gdk_property_get(): length value has wrapped in calculation (did you pass G_M...
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
list-kmaraas
: 309581 317481 317482 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-06-25 21:37 UTC by Michele Baldessari
Modified: 2005-12-12 18:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove gdk-property warnings (905 bytes, patch)
2005-06-25 21:39 UTC, Michele Baldessari
none Details | Review

Description Michele Baldessari 2005-06-25 21:37:31 UTC
Newer gtk+ have this change:

2005-05-18  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkproperty-x11.c (gdk_property_get): Warn if
        length overflows.  (#161520, Ian Wienand)

Which warns all the gdk_property_get calls that have the length parameter that 
overflow G_MAXLONG. What happens is that in gdk_property_get rounds length up to 
the next 4th byte value (length = length + 3).

In vtebg.c and vterdb.c we pass INT_MAX as length to those two calls and we end
up overflowing (because of the +3) and producing the (harmless) warning.

I'll attach a simple patch to eliminate these warnings
Comment 1 Michele Baldessari 2005-06-25 21:39:07 UTC
Created attachment 48330 [details] [review]
Remove gdk-property warnings
Comment 2 Michele Baldessari 2005-07-02 16:58:28 UTC
The gdk docs say this about the length parameter of gdk_property_get():
length:the length of the data to retrieve in bytes. Data is considered to be
retrieved in 4 byte chunks, so length will be rounded up to the next highest 4
byte boundary (so be careful not to pass a value that might overflow when
rounded up).
Comment 3 Michele Baldessari 2005-07-02 17:00:55 UTC
Ops..pressed tab and then space inadvertently..sorry about that..

Anyways, I think that by following the docs it's the app's duty to not pass
INT_MAX but INT_MAX - 3, and make sure to not overflow.
Comment 4 Michele Baldessari 2005-07-06 12:38:53 UTC
*** Bug 309581 has been marked as a duplicate of this bug. ***
Comment 5 Loïc Minier 2005-07-21 12:35:26 UTC
Hi,

Will this be released for 2.10 or should we grab the patch?

Thanks.
Comment 6 Michele Baldessari 2005-07-21 17:14:27 UTC
I'd just go for Gnome-2.12 for this one, it's just some harmless warnings with
recent gtk+'s.

Kjaartan's call though..
Comment 7 Kjartan Maraas 2005-08-08 13:55:40 UTC
Well, vte has never had stable branches so you should in theory be able to use
any 0.11.x release with any earlier stable release of GNOME.
Comment 8 Michele Baldessari 2005-08-08 18:08:45 UTC
Ah ok. Tought we'd target a specific gnome version with vte..
So I guess we can check this in now, since we'll "suggest" the just 
released 0.11.14 for the release of gnome-2.12. correct?
Comment 9 Olav Vitters 2005-09-29 15:32:21 UTC
*** Bug 317481 has been marked as a duplicate of this bug. ***
Comment 10 Olav Vitters 2005-09-29 15:32:30 UTC
*** Bug 317482 has been marked as a duplicate of this bug. ***
Comment 11 Kjartan Maraas 2005-12-12 18:37:50 UTC
This was already aplied. Must have forgotten to close the bug.