symbols: fix index-out-of-bounds in FindAutomaticType
If we enter this branch, we have 3 <= width <= 4, so if the width is 3 than syms[3] is out of bounds. Happily inherited from xkbcomp. Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
504853de3b
commit
eaf9515229
|
@ -1452,7 +1452,8 @@ FindAutomaticType(struct xkb_context *ctx, xkb_level_index_t width,
|
|||
else if (width <= 4) {
|
||||
if (syms && xkb_keysym_is_lower(syms[0]) &&
|
||||
xkb_keysym_is_upper(syms[1]))
|
||||
if (xkb_keysym_is_lower(syms[2]) && xkb_keysym_is_upper(syms[3]))
|
||||
if (width == 4 && xkb_keysym_is_lower(syms[2]) &&
|
||||
xkb_keysym_is_upper(syms[3]))
|
||||
*typeNameRtrn =
|
||||
xkb_atom_intern(ctx, "FOUR_LEVEL_ALPHABETIC");
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue