diff options
Diffstat (limited to 'Xi/sendexev.c')
-rw-r--r-- | Xi/sendexev.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Xi/sendexev.c b/Xi/sendexev.c index 0f6b4e46a..79a93b6b7 100644 --- a/Xi/sendexev.c +++ b/Xi/sendexev.c @@ -50,9 +50,7 @@ SOFTWARE. * */ -#ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> -#endif #include <X11/extensions/XI.h> #include <X11/extensions/XIproto.h> @@ -84,12 +82,11 @@ SProcXSendExtensionEvent(ClientPtr client) EventSwapPtr proc; REQUEST(xSendExtensionEventReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); swapl(&stuff->destination); swaps(&stuff->count); - if (stuff->length != + if (client->req_len != bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count + bytes_to_int32(stuff->num_events * sizeof(xEvent))) return BadLength; @@ -135,7 +132,7 @@ ProcXSendExtensionEvent(ClientPtr client) REQUEST(xSendExtensionEventReq); REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); - if (stuff->length != + if (client->req_len != bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count + (stuff->num_events * bytes_to_int32(sizeof(xEvent)))) return BadLength; |