summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-03-09 14:25:54 -0800
committerKeith Packard <keithp@keithp.com>2011-03-09 14:25:54 -0800
commitc3c0e2fdd326214e271ce144e8fc2725cbd738ef (patch)
treec7ee795c9252e1c13ae86848d109773d15b82d9e /Xi
parenta19771e4337d1c4600550314bbc42a1495a023ff (diff)
parent73555555a440855f9ae64c3367c5c7dca98c8741 (diff)
Merge remote branch 'whot/for-keith'
Diffstat (limited to 'Xi')
-rw-r--r--Xi/xipassivegrab.c4
-rw-r--r--Xi/xiproperty.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 8663d12a1..3319ef913 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -191,7 +191,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
info->status = status;
info->modifiers = *modifiers;
rep.num_modifiers++;
- rep.length++;
+ rep.length += bytes_to_int32(sizeof(xXIGrabModifierInfo));
}
}
@@ -199,7 +199,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
if (rep.num_modifiers)
{
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
- WriteSwappedDataToClient(client, rep.num_modifiers * 4, (char*)modifiers_failed);
+ WriteSwappedDataToClient(client, rep.length * 4, (char*)modifiers_failed);
}
free(modifiers_failed);
return ret;
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index 17835e2cd..83ce93014 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -1051,11 +1051,11 @@ SProcXChangeDeviceProperty (ClientPtr client)
char n;
REQUEST(xChangeDevicePropertyReq);
+ REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq);
swaps(&stuff->length, n);
swapl(&stuff->property, n);
swapl(&stuff->type, n);
swapl(&stuff->nUnits, n);
- REQUEST_SIZE_MATCH(xChangeDevicePropertyReq);
return (ProcXChangeDeviceProperty(client));
}
@@ -1295,12 +1295,12 @@ SProcXIChangeProperty(ClientPtr client)
char n;
REQUEST(xXIChangePropertyReq);
+ REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq);
swaps(&stuff->length, n);
swaps(&stuff->deviceid, n);
swapl(&stuff->property, n);
swapl(&stuff->type, n);
swapl(&stuff->num_items, n);
- REQUEST_SIZE_MATCH(xXIChangePropertyReq);
return (ProcXIChangeProperty(client));
}