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 745745 - gdbus: fix out-of-bound array access
gdbus: fix out-of-bound array access
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other All
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
: 711804 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-03-06 14:24 UTC by Marc-Andre Lureau
Modified: 2017-10-26 10:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdbus: fix out-of-bound array access (1.22 KB, patch)
2015-03-06 14:24 UTC, Marc-Andre Lureau
committed Details | Review

Description Marc-Andre Lureau 2015-03-06 14:24:01 UTC
In path_rule_matches(), the given paths may be of 0-length. Do not
access memory before the array in those case. This is for example
triggered by:

test_match_rule (con, G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH, "/", "", FALSE);

in test_connection_signal_match_rules().
Comment 1 Marc-Andre Lureau 2015-03-06 14:24:10 UTC
Created attachment 298713 [details] [review]
gdbus: fix out-of-bound array access
Comment 2 Marc-Andre Lureau 2015-03-26 14:32:53 UTC
No takers? I should credit that I found this bug with GCC ASAN.
Comment 3 Matthias Clasen 2015-03-30 02:09:22 UTC
Review of attachment 298713 [details] [review]:

Looks good to me
Comment 4 Marc-Andre Lureau 2015-04-21 20:55:40 UTC
Attachment 298713 [details] pushed as 41acf97 - gdbus: fix out-of-bound array access
Comment 5 Philip Withnall 2017-10-26 10:36:44 UTC
*** Bug 711804 has been marked as a duplicate of this bug. ***