Imported Debian patch 2:1.15.1-0ubuntu2.6
[deb_xorg-server.git] / debian / patches / CVE-2014-8xxx / 0035-CVE-2014-8098-additional.patch
CommitLineData
7217e0ca
ML
1From 61b17c0f10307e25e51e30e6fb1d3e3127f82d86 Mon Sep 17 00:00:00 2001
2From: Keith Packard <keithp@keithp.com>
3Date: Tue, 9 Dec 2014 09:30:58 -0800
4Subject: glx: Can't mix declarations and code in X.org sources [CVE-2014-8098
5 pt. 9]
6
7We're using compiler compatibility settings which generate warnings
8when a variable is declared after the first statement.
9
10Signed-off-by: Keith Packard <keithp@keithp.com>
11Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13
14diff --git a/glx/clientinfo.c b/glx/clientinfo.c
15index 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;
20 char *gl_extensions;
21 char *glx_extensions;
22+ int size;
23
24 REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq);
25
26 /* Verify that the size of the packet matches the size inferred from the
27 * sizes specified for the various fields.
28 */
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));
34--
35cgit v0.10.2
36