gs = *(GlyphSet *) buffer;
gs = *(CARD32 *) buffer;
ProcRenderCompositeGlyphs (ClientPtr client){    GlyphSetPtr     glyphSet;    GlyphSet	    gs;    PicturePtr      pSrc, pDst;    PictFormatPtr   pFormat;    GlyphListRec    listsLocal[NLOCALDELTA];    GlyphListPtr    lists, listsBase;    GlyphPtr	    glyphsLocal[NLOCALGLYPH];    Glyph	    glyph;    GlyphPtr	    *glyphs, *glyphsBase;    xGlyphElt	    *elt;    CARD8	    *buffer, *end;    int		    nglyph;    int		    nlist;    int		    space;    int		    size;    int		    n;        REQUEST(xRenderCompositeGlyphsReq);    REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq);    switch (stuff->renderReqType) {    default:			    size = 1; break;    case X_RenderCompositeGlyphs16: size = 2; break;    case X_RenderCompositeGlyphs32: size = 4; break;    }	        if (!PictOpValid (stuff->op))    {	client->errorValue = stuff->op;	return BadValue;    }    VERIFY_PICTURE (pSrc, stuff->src, client, SecurityReadAccess,		    RenderErrBase + BadPicture);    VERIFY_PICTURE (pDst, stuff->dst, client, SecurityWriteAccess,		    RenderErrBase + BadPicture);    if (pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen)	return BadMatch;    if (stuff->maskFormat)    {	pFormat = (PictFormatPtr) SecurityLookupIDByType (client,							  stuff->maskFormat,							  PictFormatType,							  SecurityReadAccess);	if (!pFormat)	{	    client->errorValue = stuff->maskFormat;	    return RenderErrBase + BadPictFormat;	}    }    else	pFormat = 0;    glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,						     stuff->glyphset,						     GlyphSetType,						     SecurityReadAccess);    if (!glyphSet)    {	client->errorValue = stuff->glyphset;	return RenderErrBase + BadGlyphSet;    }    buffer = (CARD8 *) (stuff + 1);    end = (CARD8 *) stuff + (client->req_len << 2);    nglyph = 0;    nlist = 0;    while (buffer + sizeof (xGlyphElt) < end)    {	elt = (xGlyphElt *) buffer;	buffer += sizeof (xGlyphElt);		if (elt->len == 0xff)	{	    buffer += 4;	}	else	{	    nlist++;	    nglyph += elt->len;	    space = size * elt->len;	    if (space & 3)		space += 4 - (space & 3);	    buffer += space;	}    }    if (nglyph <= NLOCALGLYPH)	glyphsBase = glyphsLocal;    else    {	glyphsBase = (GlyphPtr *) ALLOCATE_LOCAL (nglyph * sizeof (GlyphPtr));	if (!glyphsBase)	    return BadAlloc;    }    if (nlist <= NLOCALDELTA)	listsBase = listsLocal;    else    {	listsBase = (GlyphListPtr) ALLOCATE_LOCAL (nlist * sizeof (GlyphListRec));	if (!listsBase)	    return BadAlloc;    }    buffer = (CARD8 *) (stuff + 1);    glyphs = glyphsBase;    lists = listsBase;    while (buffer + sizeof (xGlyphElt) < end)    {	elt = (xGlyphElt *) buffer;	buffer += sizeof (xGlyphElt);		if (elt->len == 0xff)	{	    if (buffer + sizeof (GlyphSet) < end)	    {		gs = *(GlyphSet *) buffer;		glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client,								 gs,								 GlyphSetType,								 SecurityReadAccess);		if (!glyphSet)		{		    client->errorValue = gs;		    if (glyphsBase != glyphsLocal)			DEALLOCATE_LOCAL (glyphsBase);		    if (listsBase != listsLocal)			DEALLOCATE_LOCAL (listsBase);		    return RenderErrBase + BadGlyphSet;		}	    }	    buffer += 4;	}	else	{	    lists->xOff = elt->deltax;	    lists->yOff = elt->deltay;	    lists->format = glyphSet->format;	    lists->len = 0;	    n = elt->len;	    while (n--)	    {		if (buffer + size <= end)		{		    switch (size) {		    case 1:			glyph = *((CARD8 *)buffer); break;		    case 2:			glyph = *((CARD16 *)buffer); break;		    case 4:		    default:			glyph = *((CARD32 *)buffer); break;		    }		    if ((*glyphs = FindGlyph (glyphSet, glyph)))		    {			lists->len++;			glyphs++;		    }		}		buffer += size;	    }	    space = size * elt->len;	    if (space & 3)		buffer += 4 - (space & 3);	    lists++;	}    }    if (buffer > end)	return BadLength;    CompositeGlyphs (stuff->op,		     pSrc,		     pDst,		     pFormat,		     stuff->xSrc,		     stuff->ySrc,		     nlist,		     listsBase,		     glyphsBase);    if (glyphsBase != glyphsLocal)	DEALLOCATE_LOCAL (glyphsBase);    if (listsBase != listsLocal)	DEALLOCATE_LOCAL (listsBase);        return client->noClientException;}