1 From 61b17c0f10307e25e51e30e6fb1d3e3127f82d86 Mon Sep 17 00:00:00 2001
2 From: Keith Packard <keithp@keithp.com>
3 Date: Tue, 9 Dec 2014 09:30:58 -0800
4 Subject: glx: Can't mix declarations and code in X.org sources [CVE-2014-8098
7 We're using compiler compatibility settings which generate warnings
8 when a variable is declared after the first statement.
10 Signed-off-by: Keith Packard <keithp@keithp.com>
11 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
14 diff --git a/glx/clientinfo.c b/glx/clientinfo.c
15 index c5fef30..74ad919 100644
16 --- a/glx/clientinfo.c
17 +++ b/glx/clientinfo.c
18 @@ -36,13 +36,14 @@ set_client_info(__GLXclientState * cl, xGLXSetClientInfoARBReq * req,
19 ClientPtr client = cl->client;
24 REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq);
26 /* Verify that the size of the packet matches the size inferred from the
27 * sizes specified for the various fields.
29 - int size = sz_xGLXSetClientInfoARBReq;
30 + size = sz_xGLXSetClientInfoARBReq;
31 size = safe_add(size, safe_mul(req->numVersions, bytes_per_version));
32 size = safe_add(size, safe_pad(req->numGLExtensionBytes));
33 size = safe_add(size, safe_pad(req->numGLXExtensionBytes));