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 766211 - Fix the upper bound in g_unichar_iswide_bsearch
Fix the upper bound in g_unichar_iswide_bsearch
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 762493 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-05-10 09:14 UTC by Iain Lane
Modified: 2016-05-11 15:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the upper bound in g_unichar_iswide_bsearch (893 bytes, patch)
2016-05-10 09:14 UTC, Iain Lane
committed Details | Review

Description Iain Lane 2016-05-10 09:14:16 UTC
asan noticed an array out of bound access in this function, which was
because we were accessing G_N_ELEMENTS + 1.
Comment 1 Iain Lane 2016-05-10 09:14:20 UTC
Created attachment 327566 [details] [review]
Fix the upper bound in g_unichar_iswide_bsearch
Comment 2 Matthias Clasen 2016-05-10 19:51:44 UTC
It would be great to have a testcase that demonstrates the out-of-bound access and also successful access to the last member.
Comment 3 Matthias Clasen 2016-05-11 02:44:19 UTC
Attachment 327566 [details] pushed as bcbd8d7 - Fix the upper bound in g_unichar_iswide_bsearch
Comment 4 Christian Persch 2016-05-11 15:56:08 UTC
*** Bug 762493 has been marked as a duplicate of this bug. ***