summaryrefslogtreecommitdiff
path: root/xserver/os
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/os')
-rw-r--r--xserver/os/io.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xserver/os/io.c b/xserver/os/io.c
index 96a243d8c..bc26da7e5 100644
--- a/xserver/os/io.c
+++ b/xserver/os/io.c
@@ -480,6 +480,11 @@ ReadRequestFromClient(ClientPtr client)
if (++timesThisConnection >= MAX_TIMES_PER)
YieldControl();
if (move_header) {
+ if (client->req_len < bytes_to_int32(sizeof(xBigReq) - sizeof(xReq))) {
+ YieldControlDeath();
+ return -1;
+ }
+
request = (xReq *) oci->bufptr;
oci->bufptr += (sizeof(xBigReq) - sizeof(xReq));
*(xReq *) oci->bufptr = *request;