aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/dispatch.c')
-rwxr-xr-xxorg-server/dix/dispatch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index ff59ad237..45bd238ff 100755
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -135,10 +135,7 @@ int ProcInitialConnection();
#ifdef XSERVER_DTRACE
#include "registry.h"
-#include <sys/types.h>
-typedef const char *string;
-
-#include "Xserver-dtrace.h"
+#include "probes.h"
#endif
#define mskcnt ((MAXCLIENTS + 31) / 32)
@@ -2046,6 +2043,9 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
+ return BadLength;
+
if ((bytes_to_int32(lengthProto * stuff->height) +
bytes_to_int32(sizeof(xPutImageReq))) != client->req_len)
return BadLength;