Skip to content
Commit 2f98ddde authored by Rui Matos's avatar Rui Matos Committed by Daiki Ueno
Browse files

xadapter: Avoid a crash when Xkl doesn't know the real xkb groups

Xkl.ConfigRec gets its layouts and variants from the _XKB_RULES_NAMES
root window property which isn't specified anywhere and in fact
doesn't get set under Xwayland. The group index though is accurate
which means that we might end up trying to access an invalid index on
the layouts or variants array and crashing.

Avoid this by just lying to the caller since we can't obtain the real
layout/variant names in that case. Since this only happens under
Xwayland and in that case the only consumer of this API is gnome-shell
which ends up not using the names, this should be safe.

https://bugzilla.gnome.org/show_bug.cgi?id=756194
parent 29d7f89a
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