summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-04-25 19:52:11 +0300
committerDaniel Stone <daniel@fooishbar.org>2009-01-22 15:08:57 +1100
commitb5f49382fe48f0a762d9a15fb10a7d7e1183fc8d (patch)
tree702b7695062535454d079b2409ccc06b5a7532e4 /xkb
parent1bd7fd195d85681e722161f8c636a28f11b40abb (diff)
XKB: Sanitise ctrls action
Turn four unsigned chars into one unsigned long. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkbActions.c2
-rw-r--r--xkb/xkbtext.c2
-rw-r--r--xkb/xkmread.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index cd2688744..4eb6b0bf8 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -671,7 +671,7 @@ XkbEventCauseRec cause;
filter->keycode = keycode;
filter->active = 1;
filter->filterOthers = 0;
- change= XkbActionCtrls(&pAction->ctrls);
+ change= pAction->ctrls.ctrls;
filter->priv = change;
filter->filter = _XkbFilterControls;
filter->upAction = *pAction;
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index debc2f9c6..e91ab2e97 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -890,7 +890,7 @@ unsigned tmp;
char tbuf[32];
act= &action->ctrls;
- tmp= XkbActionCtrls(act);
+ tmp= act->ctrls;
TryCopyStr(buf,"controls=",sz);
if (tmp==0)
TryCopyStr(buf,"none",sz);
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 9ba14c41f..e4d3d4d9c 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -503,10 +503,10 @@ XkbAction *act;
case XkbSA_SetControls:
case XkbSA_LockControls:
act->ctrls.flags = wire.actionData[0];
- act->ctrls.ctrls3 = wire.actionData[1];
- act->ctrls.ctrls2 = wire.actionData[2];
- act->ctrls.ctrls1 = wire.actionData[3];
- act->ctrls.ctrls0 = wire.actionData[4];
+ act->ctrls.ctrls = (wire.actionData[1] << 24) | \
+ (wire.actionData[2] << 16) | \
+ (wire.actionData[3] << 8) | \
+ wire.actionData[4];
break;
case XkbSA_RedirectKey:
act->redirect.new_key = wire.actionData[0];