GNOME Bugzilla – Bug 762493
out of bounds read in function g_unichar_iswide_bsearch(), guniprop.c
Last modified: 2016-05-11 15:56:08 UTC
Created attachment 321902 [details] [review] Patch / Fix for out of bounds The function g_unichar_iswide_bsearch() can read out of bounds. This can be tested by running the test suite with address sanitizer enabled. The bug is in this line: int upper = G_N_ELEMENTS (g_unicode_width_table_wide) + 1; This should point to the highest element in the array g_unicode_width_table_wide. However to do that it must be number of elements minus one, not plus one. The correct code is: int upper = G_N_ELEMENTS (g_unicode_width_table_wide) - 1; Patch attached, please apply
Created attachment 321903 [details] address sanitizer error / stack trace
*** This bug has been marked as a duplicate of bug 766211 ***