Commit bcbd8d73 authored by Iain Lane's avatar Iain Lane Committed by Matthias Clasen
Browse files

Fix the upper bound in g_unichar_iswide_bsearch

asan noticed an array out of bound access in this function, which was
because we were accessing G_N_ELEMENTS + 1.
parent 9a865020
......@@ -439,7 +439,7 @@ static inline gboolean
g_unichar_iswide_bsearch (gunichar ch)
int lower = 0;
int upper = G_N_ELEMENTS (g_unicode_width_table_wide) + 1;
int upper = G_N_ELEMENTS (g_unicode_width_table_wide) - 1;
static int saved_mid = G_WIDTH_TABLE_MIDPOINT;
int mid = saved_mid;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment