Remove instances of macros SECURITY_VERIFY_GEOMETRABLE and SECURITY_VERIFY_GC.
This commit is contained in:
parent
5e334f06a1
commit
00f0705b3b
|
@ -816,8 +816,8 @@ static int
|
||||||
ProcShmPutImage(client)
|
ProcShmPutImage(client)
|
||||||
register ClientPtr client;
|
register ClientPtr client;
|
||||||
{
|
{
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
long length;
|
long length;
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
REQUEST(xShmPutImageReq);
|
REQUEST(xShmPutImageReq);
|
||||||
|
|
|
@ -531,9 +531,9 @@ ProcXvQueryEncodings(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
ProcXvPutVideo(ClientPtr client)
|
ProcXvPutVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
REQUEST(xvPutVideoReq);
|
REQUEST(xvPutVideoReq);
|
||||||
|
@ -577,9 +577,9 @@ ProcXvPutVideo(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
ProcXvPutStill(ClientPtr client)
|
ProcXvPutStill(ClientPtr client)
|
||||||
{
|
{
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
REQUEST(xvPutStillReq);
|
REQUEST(xvPutStillReq);
|
||||||
|
@ -624,9 +624,9 @@ ProcXvPutStill(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
ProcXvGetVideo(ClientPtr client)
|
ProcXvGetVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
REQUEST(xvGetVideoReq);
|
REQUEST(xvGetVideoReq);
|
||||||
|
@ -671,9 +671,9 @@ ProcXvGetVideo(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
ProcXvGetStill(ClientPtr client)
|
ProcXvGetStill(ClientPtr client)
|
||||||
{
|
{
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
register GCPtr pGC;
|
GCPtr pGC;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
REQUEST(xvGetStillReq);
|
REQUEST(xvGetStillReq);
|
||||||
|
|
128
dix/dispatch.c
128
dix/dispatch.c
|
@ -843,11 +843,15 @@ ProcCirculateWindow(register ClientPtr client)
|
||||||
int
|
int
|
||||||
GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
|
GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
|
||||||
{
|
{
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
int rc;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xResourceReq);
|
REQUEST_SIZE_MATCH(xResourceReq);
|
||||||
SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->id, client, DixReadAccess);
|
|
||||||
|
rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixReadAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
|
||||||
rep->type = X_Reply;
|
rep->type = X_Reply;
|
||||||
rep->length = 0;
|
rep->length = 0;
|
||||||
rep->sequenceNumber = client->sequence;
|
rep->sequenceNumber = client->sequence;
|
||||||
|
@ -1516,16 +1520,20 @@ int
|
||||||
ProcCreatePixmap(register ClientPtr client)
|
ProcCreatePixmap(register ClientPtr client)
|
||||||
{
|
{
|
||||||
PixmapPtr pMap;
|
PixmapPtr pMap;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
REQUEST(xCreatePixmapReq);
|
REQUEST(xCreatePixmapReq);
|
||||||
DepthPtr pDepth;
|
DepthPtr pDepth;
|
||||||
register int i;
|
register int i, rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCreatePixmapReq);
|
REQUEST_SIZE_MATCH(xCreatePixmapReq);
|
||||||
client->errorValue = stuff->pid;
|
client->errorValue = stuff->pid;
|
||||||
LEGAL_NEW_RESOURCE(stuff->pid, client);
|
LEGAL_NEW_RESOURCE(stuff->pid, client);
|
||||||
SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->drawable, client,
|
|
||||||
|
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY,
|
||||||
DixReadAccess);
|
DixReadAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
|
||||||
if (!stuff->width || !stuff->height)
|
if (!stuff->width || !stuff->height)
|
||||||
{
|
{
|
||||||
client->errorValue = 0;
|
client->errorValue = 0;
|
||||||
|
@ -1625,12 +1633,15 @@ int
|
||||||
ProcChangeGC(register ClientPtr client)
|
ProcChangeGC(register ClientPtr client)
|
||||||
{
|
{
|
||||||
GC *pGC;
|
GC *pGC;
|
||||||
REQUEST(xChangeGCReq);
|
|
||||||
int result;
|
int result;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
|
REQUEST(xChangeGCReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeGCReq);
|
REQUEST_AT_LEAST_SIZE(xChangeGCReq);
|
||||||
SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixWriteAccess);
|
|
||||||
|
result = dixLookupGC(&pGC, stuff->gc, client, DixWriteAccess);
|
||||||
|
if (result != Success)
|
||||||
|
return result;
|
||||||
|
|
||||||
len = client->req_len - (sizeof(xChangeGCReq) >> 2);
|
len = client->req_len - (sizeof(xChangeGCReq) >> 2);
|
||||||
if (len != Ones(stuff->mask))
|
if (len != Ones(stuff->mask))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
@ -1648,14 +1659,18 @@ ProcChangeGC(register ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcCopyGC(register ClientPtr client)
|
ProcCopyGC(register ClientPtr client)
|
||||||
{
|
{
|
||||||
register GC *dstGC;
|
GC *dstGC;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
int result;
|
int result;
|
||||||
REQUEST(xCopyGCReq);
|
REQUEST(xCopyGCReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCopyGCReq);
|
REQUEST_SIZE_MATCH(xCopyGCReq);
|
||||||
SECURITY_VERIFY_GC( pGC, stuff->srcGC, client, DixReadAccess);
|
|
||||||
SECURITY_VERIFY_GC( dstGC, stuff->dstGC, client, DixWriteAccess);
|
result = dixLookupGC(&pGC, stuff->srcGC, client, DixReadAccess);
|
||||||
|
if (result != Success)
|
||||||
|
return result;
|
||||||
|
result = dixLookupGC(&dstGC, stuff->dstGC, client, DixWriteAccess);
|
||||||
|
if (result != Success)
|
||||||
|
return result;
|
||||||
if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth))
|
if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth))
|
||||||
return (BadMatch);
|
return (BadMatch);
|
||||||
result = CopyGC(pGC, dstGC, stuff->mask);
|
result = CopyGC(pGC, dstGC, stuff->mask);
|
||||||
|
@ -1671,7 +1686,7 @@ ProcCopyGC(register ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcSetDashes(register ClientPtr client)
|
ProcSetDashes(register ClientPtr client)
|
||||||
{
|
{
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
int result;
|
int result;
|
||||||
REQUEST(xSetDashesReq);
|
REQUEST(xSetDashesReq);
|
||||||
|
|
||||||
|
@ -1682,7 +1697,9 @@ ProcSetDashes(register ClientPtr client)
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
SECURITY_VERIFY_GC(pGC,stuff->gc, client, DixWriteAccess);
|
result = dixLookupGC(&pGC,stuff->gc, client, DixWriteAccess);
|
||||||
|
if (result != Success)
|
||||||
|
return result;
|
||||||
|
|
||||||
result = SetDashes(pGC, stuff->dashOffset, stuff->nDashes,
|
result = SetDashes(pGC, stuff->dashOffset, stuff->nDashes,
|
||||||
(unsigned char *)&stuff[1]);
|
(unsigned char *)&stuff[1]);
|
||||||
|
@ -1698,9 +1715,8 @@ ProcSetDashes(register ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcSetClipRectangles(register ClientPtr client)
|
ProcSetClipRectangles(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int nr;
|
int nr, result;
|
||||||
int result;
|
GC *pGC;
|
||||||
register GC *pGC;
|
|
||||||
REQUEST(xSetClipRectanglesReq);
|
REQUEST(xSetClipRectanglesReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
|
REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
|
||||||
|
@ -1710,7 +1726,9 @@ ProcSetClipRectangles(register ClientPtr client)
|
||||||
client->errorValue = stuff->ordering;
|
client->errorValue = stuff->ordering;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
SECURITY_VERIFY_GC(pGC,stuff->gc, client, DixWriteAccess);
|
result = dixLookupGC(&pGC,stuff->gc, client, DixWriteAccess);
|
||||||
|
if (result != Success)
|
||||||
|
return result;
|
||||||
|
|
||||||
nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq);
|
nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq);
|
||||||
if (nr & 4)
|
if (nr & 4)
|
||||||
|
@ -1727,11 +1745,15 @@ ProcSetClipRectangles(register ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcFreeGC(register ClientPtr client)
|
ProcFreeGC(register ClientPtr client)
|
||||||
{
|
{
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
|
int rc;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xResourceReq);
|
REQUEST_SIZE_MATCH(xResourceReq);
|
||||||
SECURITY_VERIFY_GC(pGC, stuff->id, client, DixDestroyAccess);
|
|
||||||
|
rc = dixLookupGC(&pGC, stuff->id, client, DixDestroyAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
|
||||||
FreeResource(stuff->id, RT_NONE);
|
FreeResource(stuff->id, RT_NONE);
|
||||||
return(client->noClientException);
|
return(client->noClientException);
|
||||||
}
|
}
|
||||||
|
@ -1766,9 +1788,9 @@ ProcClearToBackground(register ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcCopyArea(register ClientPtr client)
|
ProcCopyArea(register ClientPtr client)
|
||||||
{
|
{
|
||||||
register DrawablePtr pDst;
|
DrawablePtr pDst;
|
||||||
DrawablePtr pSrc;
|
DrawablePtr pSrc;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
REQUEST(xCopyAreaReq);
|
REQUEST(xCopyAreaReq);
|
||||||
RegionPtr pRgn;
|
RegionPtr pRgn;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -1811,7 +1833,7 @@ int
|
||||||
ProcCopyPlane(register ClientPtr client)
|
ProcCopyPlane(register ClientPtr client)
|
||||||
{
|
{
|
||||||
DrawablePtr psrcDraw, pdstDraw;
|
DrawablePtr psrcDraw, pdstDraw;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
REQUEST(xCopyPlaneReq);
|
REQUEST(xCopyPlaneReq);
|
||||||
RegionPtr pRgn;
|
RegionPtr pRgn;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -1862,8 +1884,8 @@ int
|
||||||
ProcPolyPoint(register ClientPtr client)
|
ProcPolyPoint(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int npoint;
|
int npoint;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
REQUEST(xPolyPointReq);
|
REQUEST(xPolyPointReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xPolyPointReq);
|
REQUEST_AT_LEAST_SIZE(xPolyPointReq);
|
||||||
|
@ -1885,8 +1907,8 @@ int
|
||||||
ProcPolyLine(register ClientPtr client)
|
ProcPolyLine(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int npoint;
|
int npoint;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
REQUEST(xPolyLineReq);
|
REQUEST(xPolyLineReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xPolyLineReq);
|
REQUEST_AT_LEAST_SIZE(xPolyLineReq);
|
||||||
|
@ -1908,8 +1930,8 @@ int
|
||||||
ProcPolySegment(register ClientPtr client)
|
ProcPolySegment(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int nsegs;
|
int nsegs;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
REQUEST(xPolySegmentReq);
|
REQUEST(xPolySegmentReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xPolySegmentReq);
|
REQUEST_AT_LEAST_SIZE(xPolySegmentReq);
|
||||||
|
@ -1927,8 +1949,8 @@ int
|
||||||
ProcPolyRectangle (register ClientPtr client)
|
ProcPolyRectangle (register ClientPtr client)
|
||||||
{
|
{
|
||||||
int nrects;
|
int nrects;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
REQUEST(xPolyRectangleReq);
|
REQUEST(xPolyRectangleReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xPolyRectangleReq);
|
REQUEST_AT_LEAST_SIZE(xPolyRectangleReq);
|
||||||
|
@ -1947,8 +1969,8 @@ int
|
||||||
ProcPolyArc(register ClientPtr client)
|
ProcPolyArc(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int narcs;
|
int narcs;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
REQUEST(xPolyArcReq);
|
REQUEST(xPolyArcReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xPolyArcReq);
|
REQUEST_AT_LEAST_SIZE(xPolyArcReq);
|
||||||
|
@ -1966,8 +1988,8 @@ int
|
||||||
ProcFillPoly(register ClientPtr client)
|
ProcFillPoly(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int things;
|
int things;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
REQUEST(xFillPolyReq);
|
REQUEST(xFillPolyReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xFillPolyReq);
|
REQUEST_AT_LEAST_SIZE(xFillPolyReq);
|
||||||
|
@ -1997,8 +2019,8 @@ int
|
||||||
ProcPolyFillRectangle(register ClientPtr client)
|
ProcPolyFillRectangle(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int things;
|
int things;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
REQUEST(xPolyFillRectangleReq);
|
REQUEST(xPolyFillRectangleReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq);
|
REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq);
|
||||||
|
@ -2018,8 +2040,8 @@ int
|
||||||
ProcPolyFillArc(register ClientPtr client)
|
ProcPolyFillArc(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int narcs;
|
int narcs;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
REQUEST(xPolyFillArcReq);
|
REQUEST(xPolyFillArcReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xPolyFillArcReq);
|
REQUEST_AT_LEAST_SIZE(xPolyFillArcReq);
|
||||||
|
@ -2090,8 +2112,8 @@ ReformatImage (char *base, int nbytes, int bpp, int order)
|
||||||
int
|
int
|
||||||
ProcPutImage(register ClientPtr client)
|
ProcPutImage(register ClientPtr client)
|
||||||
{
|
{
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
long length; /* length of scanline server padded */
|
long length; /* length of scanline server padded */
|
||||||
long lengthProto; /* length of scanline protocol padded */
|
long lengthProto; /* length of scanline protocol padded */
|
||||||
char *tmpImage;
|
char *tmpImage;
|
||||||
|
@ -2411,8 +2433,8 @@ int
|
||||||
ProcImageText8(register ClientPtr client)
|
ProcImageText8(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
|
|
||||||
REQUEST(xImageTextReq);
|
REQUEST(xImageTextReq);
|
||||||
|
|
||||||
|
@ -2441,8 +2463,8 @@ int
|
||||||
ProcImageText16(register ClientPtr client)
|
ProcImageText16(register ClientPtr client)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
register GC *pGC;
|
GC *pGC;
|
||||||
|
|
||||||
REQUEST(xImageTextReq);
|
REQUEST(xImageTextReq);
|
||||||
|
|
||||||
|
@ -3195,11 +3217,12 @@ int
|
||||||
ProcQueryBestSize (register ClientPtr client)
|
ProcQueryBestSize (register ClientPtr client)
|
||||||
{
|
{
|
||||||
xQueryBestSizeReply reply;
|
xQueryBestSizeReply reply;
|
||||||
register DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
int rc;
|
||||||
REQUEST(xQueryBestSizeReq);
|
REQUEST(xQueryBestSizeReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xQueryBestSizeReq);
|
REQUEST_SIZE_MATCH(xQueryBestSizeReq);
|
||||||
|
|
||||||
if ((stuff->class != CursorShape) &&
|
if ((stuff->class != CursorShape) &&
|
||||||
(stuff->class != TileShape) &&
|
(stuff->class != TileShape) &&
|
||||||
(stuff->class != StippleShape))
|
(stuff->class != StippleShape))
|
||||||
|
@ -3207,8 +3230,11 @@ ProcQueryBestSize (register ClientPtr client)
|
||||||
client->errorValue = stuff->class;
|
client->errorValue = stuff->class;
|
||||||
return(BadValue);
|
return(BadValue);
|
||||||
}
|
}
|
||||||
SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->drawable, client,
|
|
||||||
|
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY,
|
||||||
DixReadAccess);
|
DixReadAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW)
|
if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW)
|
||||||
return (BadMatch);
|
return (BadMatch);
|
||||||
pScreen = pDraw->pScreen;
|
pScreen = pDraw->pScreen;
|
||||||
|
|
|
@ -239,10 +239,15 @@ SOFTWARE.
|
||||||
if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\
|
if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\
|
||||||
(client->lastDrawableID != drawID))\
|
(client->lastDrawableID != drawID))\
|
||||||
{\
|
{\
|
||||||
SECURITY_VERIFY_GEOMETRABLE(pDraw, drawID, client, DixWriteAccess);\
|
int rc;\
|
||||||
SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixReadAccess);\
|
rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY,\
|
||||||
if ((pGC->depth != pDraw->depth) ||\
|
DixWriteAccess);\
|
||||||
(pGC->pScreen != pDraw->pScreen))\
|
if (rc != Success)\
|
||||||
|
return rc;\
|
||||||
|
rc = dixLookupGC(&(pGC), stuff->gc, client, DixReadAccess);\
|
||||||
|
if (rc != Success)\
|
||||||
|
return rc;\
|
||||||
|
if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
|
||||||
return (BadMatch);\
|
return (BadMatch);\
|
||||||
client->lastDrawable = pDraw;\
|
client->lastDrawable = pDraw;\
|
||||||
client->lastDrawableID = drawID;\
|
client->lastDrawableID = drawID;\
|
||||||
|
|
|
@ -220,12 +220,15 @@ ProcXFixesCreateRegionFromGC (ClientPtr client)
|
||||||
{
|
{
|
||||||
RegionPtr pRegion, pClip;
|
RegionPtr pRegion, pClip;
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
|
int rc;
|
||||||
REQUEST (xXFixesCreateRegionFromGCReq);
|
REQUEST (xXFixesCreateRegionFromGCReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xXFixesCreateRegionFromGCReq);
|
REQUEST_SIZE_MATCH (xXFixesCreateRegionFromGCReq);
|
||||||
LEGAL_NEW_RESOURCE (stuff->region, client);
|
LEGAL_NEW_RESOURCE (stuff->region, client);
|
||||||
|
|
||||||
SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixReadAccess);
|
rc = dixLookupGC(&pGC, stuff->gc, client, DixReadAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
|
||||||
switch (pGC->clientClipType) {
|
switch (pGC->clientClipType) {
|
||||||
case CT_PIXMAP:
|
case CT_PIXMAP:
|
||||||
|
@ -630,10 +633,14 @@ ProcXFixesSetGCClipRegion (ClientPtr client)
|
||||||
GCPtr pGC;
|
GCPtr pGC;
|
||||||
RegionPtr pRegion;
|
RegionPtr pRegion;
|
||||||
XID vals[2];
|
XID vals[2];
|
||||||
|
int rc;
|
||||||
REQUEST(xXFixesSetGCClipRegionReq);
|
REQUEST(xXFixesSetGCClipRegionReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
|
REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
|
||||||
SECURITY_VERIFY_GC(pGC, stuff->gc, client, DixWriteAccess);
|
|
||||||
|
rc = dixLookupGC(&pGC, stuff->gc, client, DixWriteAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
|
||||||
VERIFY_REGION_OR_NONE (pRegion, stuff->region, client, DixReadAccess);
|
VERIFY_REGION_OR_NONE (pRegion, stuff->region, client, DixReadAccess);
|
||||||
|
|
||||||
if (pRegion)
|
if (pRegion)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user