aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/xkb/xkbEvents.c
diff options
context:
space:
mode:
authorPeter Åstrand <astrand@cendio.se>2009-02-13 10:23:28 +0100
committerUlrich Sibiller <uli42@gmx.de>2015-07-02 00:24:11 +0200
commitd088698324d5e71cb93ccd429f084729ba07872c (patch)
tree770207f94a7e65c6fc1e48f659ebc77a2f0f8cae /nx-X11/programs/Xserver/xkb/xkbEvents.c
parentcf660f485eb478bcb7aaef3a538f2791e46662d9 (diff)
downloadnx-libs-d088698324d5e71cb93ccd429f084729ba07872c.tar.gz
nx-libs-d088698324d5e71cb93ccd429f084729ba07872c.tar.bz2
nx-libs-d088698324d5e71cb93ccd429f084729ba07872c.zip
Backport: xserver: Avoid sending uninitialized padding data over the network
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'nx-X11/programs/Xserver/xkb/xkbEvents.c')
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbEvents.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/xkb/xkbEvents.c b/nx-X11/programs/Xserver/xkb/xkbEvents.c
index 8305208a0..914e3e782 100644
--- a/nx-X11/programs/Xserver/xkb/xkbEvents.c
+++ b/nx-X11/programs/Xserver/xkb/xkbEvents.c
@@ -730,6 +730,7 @@ XkbSrvLedInfoPtr sli;
}
if (pChanges->map.changed) {
xkbMapNotify mn;
+ memset(&mn, 0, sizeof(xkbMapNotify));
mn.changed= pChanges->map.changed;
mn.firstType= pChanges->map.first_type;
mn.nTypes= pChanges->map.num_types;
@@ -751,6 +752,7 @@ XkbSrvLedInfoPtr sli;
if ((pChanges->ctrls.changed_ctrls)||
(pChanges->ctrls.enabled_ctrls_changes)) {
xkbControlsNotify cn;
+ memset(&cn, 0, sizeof(xkbControlsNotify));
cn.changedControls= pChanges->ctrls.changed_ctrls;
cn.enabledControlChanges= pChanges->ctrls.enabled_ctrls_changes;
cn.keycode= cause->kc;
@@ -763,6 +765,7 @@ XkbSrvLedInfoPtr sli;
xkbIndicatorNotify in;
if (sli==NULL)
sli= XkbFindSrvLedInfo(kbd,XkbDfltXIClass,XkbDfltXIId,0);
+ memset(&in, 0, sizeof(xkbIndicatorNotify));
in.state= sli->effectiveState;
in.changed= pChanges->indicators.map_changes;
XkbSendIndicatorNotify(kbd,XkbIndicatorMapNotify,&in);
@@ -771,12 +774,14 @@ XkbSrvLedInfoPtr sli;
xkbIndicatorNotify in;
if (sli==NULL)
sli= XkbFindSrvLedInfo(kbd,XkbDfltXIClass,XkbDfltXIId,0);
+ memset(&in, 0, sizeof(xkbIndicatorNotify));
in.state= sli->effectiveState;
in.changed= pChanges->indicators.state_changes;
XkbSendIndicatorNotify(kbd,XkbIndicatorStateNotify,&in);
}
if (pChanges->names.changed) {
xkbNamesNotify nn;
+ memset(&nn, 0, sizeof(xkbNamesNotify));
nn.changed= pChanges->names.changed;
nn.firstType= pChanges->names.first_type;
nn.nTypes= pChanges->names.num_types;
@@ -789,6 +794,7 @@ XkbSrvLedInfoPtr sli;
}
if ((pChanges->compat.changed_groups)||(pChanges->compat.num_si>0)) {
xkbCompatMapNotify cmn;
+ memset(&cmn, 0, sizeof(xkbCompatMapNotify));
cmn.changedGroups= pChanges->compat.changed_groups;
cmn.firstSI= pChanges->compat.first_si;
cmn.nSI= pChanges->compat.num_si;