diff options
author | marha <marha@users.sourceforge.net> | 2010-09-11 08:41:00 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-09-11 08:41:00 +0000 |
commit | e172c89783326e2378e4793ff31a0f44210c5534 (patch) | |
tree | 7faed3d12aa20736af6a18fff1a5745cdf57de46 /xorg-server/xkb | |
parent | c3d4371fec1beb5b71d21a90be5db6d32c4c185f (diff) | |
download | vcxsrv-e172c89783326e2378e4793ff31a0f44210c5534.tar.gz vcxsrv-e172c89783326e2378e4793ff31a0f44210c5534.tar.bz2 vcxsrv-e172c89783326e2378e4793ff31a0f44210c5534.zip |
xserver git update 11/9/2010
Diffstat (limited to 'xorg-server/xkb')
-rw-r--r-- | xorg-server/xkb/ddxList.c | 8 | ||||
-rw-r--r-- | xorg-server/xkb/xkb.c | 7 | ||||
-rw-r--r-- | xorg-server/xkb/xkbActions.c | 1 | ||||
-rw-r--r-- | xorg-server/xkb/xkbEvents.c | 9 | ||||
-rw-r--r-- | xorg-server/xkb/xkbLEDs.c | 13 | ||||
-rw-r--r-- | xorg-server/xkb/xkmread.c | 9 |
6 files changed, 25 insertions, 22 deletions
diff --git a/xorg-server/xkb/ddxList.c b/xorg-server/xkb/ddxList.c index ce3445bda..16bca16db 100644 --- a/xorg-server/xkb/ddxList.c +++ b/xorg-server/xkb/ddxList.c @@ -161,6 +161,7 @@ char tmpname[PATH_MAX]; }
if (!in) {
haveDir= FALSE;
+ free(buf);
buf = Xprintf(
"'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg,
XkbBinDirectory,XkbBaseDirectory,componentDirs[what],(long)
@@ -176,6 +177,7 @@ char tmpname[PATH_MAX]; }
if (!in) {
haveDir= FALSE;
+ free(buf);
buf = Xprintf(
"xkbcomp -R%s -w %ld -l -vlfhpR '%s'" W32_tmparg,
componentDirs[what],(long)
@@ -200,8 +202,7 @@ char tmpname[PATH_MAX]; }
if (!in)
{
- if (buf != NULL)
- free(buf);
+ free(buf);
#ifdef WIN32
unlink(tmpname);
#endif
@@ -264,8 +265,7 @@ char tmpname[PATH_MAX]; fclose(in);
unlink(tmpname);
#endif
- if (buf != NULL)
- free(buf);
+ free(buf);
return status;
}
diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c index 965118cbb..7ed875225 100644 --- a/xorg-server/xkb/xkb.c +++ b/xorg-server/xkb/xkb.c @@ -224,7 +224,8 @@ ProcXkbSelectEvents(ClientPtr client) masks = XkbFindClientResource((DevicePtr)dev,client);
if (!masks){
XID id = FakeClientID(client->index);
- AddResource(id,RT_XKBCLIENT,dev);
+ if (!AddResource(id,RT_XKBCLIENT,dev))
+ return BadAlloc;
masks= XkbAddClientResource((DevicePtr)dev,client,id);
}
if (masks) {
@@ -3019,6 +3020,7 @@ register unsigned bit; to = (CARD8 *)wire;
if ((to-map)!=length) {
client->errorValue = _XkbErrCode2(0xff,length);
+ free(map);
return BadLength;
}
}
@@ -5377,7 +5379,8 @@ ProcXkbPerClientFlags(ClientPtr client) }
else if (want && (!interest)) {
XID id = FakeClientID(client->index);
- AddResource(id,RT_XKBCLIENT,dev);
+ if (!AddResource(id,RT_XKBCLIENT,dev))
+ return BadAlloc;
interest= XkbAddClientResource((DevicePtr)dev,client,id);
if (!interest)
return BadAlloc;
diff --git a/xorg-server/xkb/xkbActions.c b/xorg-server/xkb/xkbActions.c index a60b20bbd..11c52c3c2 100644 --- a/xorg-server/xkb/xkbActions.c +++ b/xorg-server/xkb/xkbActions.c @@ -806,6 +806,7 @@ ProcessInputProc backupproc; /* never actually used uninitialised, but gcc isn't smart enough
* to work that out. */
memset(&old, 0, sizeof(old));
+ memset(&ev, 0, sizeof(ev));
if ((filter->keycode!=0)&&(filter->keycode!=keycode))
return 1;
diff --git a/xorg-server/xkb/xkbEvents.c b/xorg-server/xkb/xkbEvents.c index ee62b9947..3780be12d 100644 --- a/xorg-server/xkb/xkbEvents.c +++ b/xorg-server/xkb/xkbEvents.c @@ -1045,15 +1045,6 @@ XkbInterestPtr interest; interest->dev = dev;
interest->client = client;
interest->resource = id;
- interest->stateNotifyMask= 0;
- interest->ctrlsNotifyMask= 0;
- interest->namesNotifyMask= 0;
- interest->compatNotifyMask= 0;
- interest->bellNotifyMask= FALSE;
- interest->accessXNotifyMask= 0;
- interest->iStateNotifyMask= 0;
- interest->iMapNotifyMask= 0;
- interest->altSymsNotifyMask= 0;
interest->next = dev->xkb_interest;
dev->xkb_interest= interest;
return interest;
diff --git a/xorg-server/xkb/xkbLEDs.c b/xorg-server/xkb/xkbLEDs.c index 65d8739be..14767157b 100644 --- a/xorg-server/xkb/xkbLEDs.c +++ b/xorg-server/xkb/xkbLEDs.c @@ -556,6 +556,7 @@ Bool checkNames; else if ((kf!=NULL)&&((kf->xkb_sli->flags&XkbSLI_IsDefault)!=0)) {
XkbDescPtr xkb;
xkb= dev->key->xkbInfo->desc;
+ sli= kf->xkb_sli;
sli->physIndicators= xkb->indicators->phys_indicators;
if (xkb->names->indicators!=sli->names) {
checkNames= TRUE;
@@ -584,6 +585,8 @@ Bool checkNames; sli->maps= NULL;
sli->names= NULL;
}
+ else
+ return NULL;
if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
sli->names= calloc(XkbNumIndicators, sizeof(Atom));
if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
@@ -714,10 +717,12 @@ XkbSrvLedInfoPtr sli; }
}
}
- if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
- sli->names= calloc(XkbNumIndicators, sizeof(Atom));
- if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
- sli->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
+ if (sli) {
+ if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
+ sli->names= calloc(XkbNumIndicators, sizeof(Atom));
+ if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
+ sli->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
+ }
return sli;
}
diff --git a/xorg-server/xkb/xkmread.c b/xorg-server/xkb/xkmread.c index 4b2043667..81f09fe3b 100644 --- a/xorg-server/xkb/xkmread.c +++ b/xorg-server/xkb/xkmread.c @@ -534,8 +534,7 @@ XkbAction *act; case XkbSA_XFree86Private:
/* copy the kind of action */
- strncpy((char*)act->any.data, (char*)wire.actionData,
- XkbAnyActionDataSize);
+ memcpy(act->any.data, wire.actionData, XkbAnyActionDataSize);
break ;
case XkbSA_Terminate:
@@ -687,7 +686,11 @@ int nRead=0; if ((tmp=XkmGetCountedString(file,buf,100))<1)
return -1;
nRead+= tmp;
- if ((buf[0]!='\0')&&(xkb->names)) {
+
+ if (!xkb->names)
+ continue;
+
+ if (buf[0]!='\0') {
Atom name;
name= XkbInternAtom(buf,0);
xkb->names->groups[i]= name;
|