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>
This commit is contained in:
parent
b20912c3d4
commit
61b17c0f10
|
@ -36,13 +36,14 @@ set_client_info(__GLXclientState * cl, xGLXSetClientInfoARBReq * req,
|
||||||
ClientPtr client = cl->client;
|
ClientPtr client = cl->client;
|
||||||
char *gl_extensions;
|
char *gl_extensions;
|
||||||
char *glx_extensions;
|
char *glx_extensions;
|
||||||
|
int size;
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq);
|
REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq);
|
||||||
|
|
||||||
/* Verify that the size of the packet matches the size inferred from the
|
/* Verify that the size of the packet matches the size inferred from the
|
||||||
* sizes specified for the various fields.
|
* 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_mul(req->numVersions, bytes_per_version));
|
||||||
size = safe_add(size, safe_pad(req->numGLExtensionBytes));
|
size = safe_add(size, safe_pad(req->numGLExtensionBytes));
|
||||||
size = safe_add(size, safe_pad(req->numGLXExtensionBytes));
|
size = safe_add(size, safe_pad(req->numGLXExtensionBytes));
|
||||||
|
|
Loading…
Reference in New Issue