keycodes: don't try to copy zero key aliases
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 23 Jul 2018 01:48:35 +0000 (11:48 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 1 Aug 2018 03:50:38 +0000 (13:50 +1000)
commitbadb428e63387140720f22486b3acbd3d738859f
treebfddc41af2433c41a39f5bdbd26b943f3fe692d8
parent9045b035981e4273ddbb64bfb31577bbf92d8597
keycodes: don't try to copy zero key aliases

Move the aliases copy to within the (num_key_aliases > 0) block.

Passing info->aliases into this fuction with invalid aliases will
cause log messages but num_key_aliases stays on 0. The key_aliases array
is never allocated and remains NULL. We then loop through the aliases, causing
a null-pointer dereference.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/xkbcomp/keycodes.c