glx: Length-checking for non-generated vendor private requests [CVE-2014-8098 6/8]

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Michal Srb <msrb@suse.com>
Reviewed-by: Andy Ritger <aritger@nvidia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Adam Jackson 2014-11-10 12:13:46 -05:00 committed by Alan Coopersmith
parent afe177020d
commit 44ba149f28
2 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,8 @@ DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc,
__GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
ClientPtr client = cl->client;
REQUEST_FIXED_SIZE(xGLXVendorPrivateWithReplyReq, 8);
pc += __GLX_VENDPRIV_HDR_SIZE;
if (cx != NULL) {
GLenum target;

View File

@ -46,6 +46,8 @@ DoSwapInterval(__GLXclientState * cl, GLbyte * pc, int do_swap)
__GLXcontext *cx;
GLint interval;
REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 4);
cx = __glXLookupContextByTag(cl, tag);
if ((cx == NULL) || (cx->pGlxScreen == NULL)) {