projects
/
platform
/
upstream
/
libxkbcommon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
032f8b6
)
x11: add 0 < ctrls->numGroups <= 4 assertion
author
Ran Benita
<ran234@gmail.com>
Sun, 9 Feb 2014 08:27:45 +0000
(10:27 +0200)
committer
Ran Benita
<ran234@gmail.com>
Sun, 9 Feb 2014 12:05:59 +0000
(14:05 +0200)
This only happens if something is wrong in the server; a valid keymap
cannot be had in any case.
Signed-off-by: Ran Benita <ran234@gmail.com>
src/x11/keymap.c
patch
|
blob
|
history
diff --git
a/src/x11/keymap.c
b/src/x11/keymap.c
index
aa91033
..
4c6b29c
100644
(file)
--- a/
src/x11/keymap.c
+++ b/
src/x11/keymap.c
@@
-1099,6
+1099,7
@@
get_controls(struct xkb_keymap *keymap, xcb_connection_t *conn,
xcb_xkb_get_controls_reply(conn, cookie, NULL);
FAIL_IF_BAD_REPLY(reply, "XkbGetControls");
+ FAIL_UNLESS(reply->numGroups > 0 && reply->numGroups <= 4);
keymap->enabled_ctrls = translate_controls_mask(reply->enabledControls);
keymap->num_groups = reply->numGroups;