Commit ad29acd7 authored by Adam Jackson's avatar Adam Jackson Committed by Mike Gabriel

glx: Top-level length checking for swapped VendorPrivate requests [CVE-2014-8098 4/8]

v2: backport to nx-libs 3.6.x (Mike DePaulo) Reviewed-by: 's avatarKeith Packard <keithp@keithp.com> Reviewed-by: 's avatarJulien Cristau <jcristau@debian.org> Reviewed-by: 's avatarMichal Srb <msrb@suse.com> Reviewed-by: 's avatarAndy Ritger <aritger@nvidia.com> Signed-off-by: 's avatarAdam Jackson <ajax@redhat.com> Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: 's avatarFedora X Ninjas <x@fedoraproject.org> Signed-off-by: 's avatarDave Airlie <airlied@redhat.com>
parent ddb1235b
......@@ -797,10 +797,12 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc)
{
ClientPtr client = cl->client;
xGLXVendorPrivateReq *req;
GLint vendorcode;
__GLX_DECLARE_SWAP_VARIABLES;
REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateReq);
req = (xGLXVendorPrivateReq *) pc;
__GLX_SWAP_SHORT(&req->length);
......@@ -835,10 +837,12 @@ int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc)
int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
{
ClientPtr client = cl->client;
xGLXVendorPrivateWithReplyReq *req;
GLint vendorcode;
__GLX_DECLARE_SWAP_VARIABLES;
REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateWithReplyReq);
req = (xGLXVendorPrivateWithReplyReq *) pc;
__GLX_SWAP_SHORT(&req->length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment