diff options
author | Keith Packard <keithp@keithp.com> | 2014-12-09 09:30:58 -0800 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2014-12-09 20:54:12 +0100 |
commit | 1069ca99298bf1e85e001bfde90b00a42afdb5d8 (patch) | |
tree | 56e39ba66145742b4e042237d90dace4b3c92d87 | |
parent | 044764b5c627d1a6e8ea1dd8cf741a26aeb4b2e7 (diff) |
glx: Can't mix declarations and code in X.org sources [CVE-2014-8098 pt. 9]
We're using compiler compatibility settings which generate warnings
when a variable is declared after the first statement.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 61b17c0f10307e25e51e30e6fb1d3e3127f82d86)
Signed-off-by: Julien Cristau <jcristau@debian.org>
-rw-r--r-- | glx/clientinfo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/glx/clientinfo.c b/glx/clientinfo.c index c5fef3074..74ad91991 100644 --- a/glx/clientinfo.c +++ b/glx/clientinfo.c @@ -36,13 +36,14 @@ set_client_info(__GLXclientState * cl, xGLXSetClientInfoARBReq * req, ClientPtr client = cl->client; char *gl_extensions; char *glx_extensions; + int size; REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq); /* Verify that the size of the packet matches the size inferred from the * sizes specified for the various fields. */ - int size = sz_xGLXSetClientInfoARBReq; + size = sz_xGLXSetClientInfoARBReq; size = safe_add(size, safe_mul(req->numVersions, bytes_per_version)); size = safe_add(size, safe_pad(req->numGLExtensionBytes)); size = safe_add(size, safe_pad(req->numGLXExtensionBytes)); |