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 792301 - TrackerNotifier should be more pedantic about integer sizes when parsing them out of GVariants
TrackerNotifier should be more pedantic about integer sizes when parsing them...
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
git master
Other All
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2018-01-07 14:09 UTC by Debarshi Ray
Modified: 2018-01-23 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-sparql: Be more careful about integer sizes (1.69 KB, patch)
2018-01-07 14:10 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2018-01-07 14:09:37 UTC
The GraphUpdated signal is supposed to have "sa(iiii)a(iiii)" parameters. The GVariant type string "i" refers to a 32-bit signed integer. Therefore, gint32 is a much safer bet than gint, whose size is not guaranteed across all platforms.
Comment 1 Debarshi Ray 2018-01-07 14:10:43 UTC
Created attachment 366457 [details] [review]
libtracker-sparql: Be more careful about integer sizes
Comment 2 Carlos Garnacho 2018-01-23 13:53:41 UTC
Comment on attachment 366457 [details] [review]
libtracker-sparql: Be more careful about integer sizes

Makes sense given the current state of things. It's not the only wrong type length along the chain, but we can't easily move to int64_t enabled GraphUpdated without API breaks or horrible migration anyway...
Comment 3 Debarshi Ray 2018-01-23 14:38:55 UTC
Comment on attachment 366457 [details] [review]
libtracker-sparql: Be more careful about integer sizes

Thanks, Carlos.