idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
12,000 | ProcChangeAccessControl(ClientPtr client)
{
REQUEST(xSetAccessControlReq);
REQUEST_SIZE_MATCH(xSetAccessControlReq);
if ((stuff->mode != EnableAccess) && (stuff->mode != DisableAccess)) {
client->errorValue = stuff->mode;
return BadValue;
}
return ChangeAccessControl(client, stuff->... | DoS | 0 | ProcChangeAccessControl(ClientPtr client)
{
REQUEST(xSetAccessControlReq);
REQUEST_SIZE_MATCH(xSetAccessControlReq);
if ((stuff->mode != EnableAccess) && (stuff->mode != DisableAccess)) {
client->errorValue = stuff->mode;
return BadValue;
}
return ChangeAccessControl(client, stuff->... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,001 | ProcChangeCloseDownMode(ClientPtr client)
{
int rc;
REQUEST(xSetCloseDownModeReq);
REQUEST_SIZE_MATCH(xSetCloseDownModeReq);
rc = XaceHook(XACE_CLIENT_ACCESS, client, client, DixManageAccess);
if (rc != Success)
return rc;
if ((stuff->mode == AllTemporary) ||
(stuff->mode == R... | DoS | 0 | ProcChangeCloseDownMode(ClientPtr client)
{
int rc;
REQUEST(xSetCloseDownModeReq);
REQUEST_SIZE_MATCH(xSetCloseDownModeReq);
rc = XaceHook(XACE_CLIENT_ACCESS, client, client, DixManageAccess);
if (rc != Success)
return rc;
if ((stuff->mode == AllTemporary) ||
(stuff->mode == R... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,002 | ProcChangeGC(ClientPtr client)
{
GC *pGC;
int result;
unsigned len;
REQUEST(xChangeGCReq);
REQUEST_AT_LEAST_SIZE(xChangeGCReq);
result = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess);
if (result != Success)
return result;
len = client->req_len - bytes_to_int32(sizeof(... | DoS | 0 | ProcChangeGC(ClientPtr client)
{
GC *pGC;
int result;
unsigned len;
REQUEST(xChangeGCReq);
REQUEST_AT_LEAST_SIZE(xChangeGCReq);
result = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess);
if (result != Success)
return result;
len = client->req_len - bytes_to_int32(sizeof(... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,003 | ProcChangeHosts(ClientPtr client)
{
REQUEST(xChangeHostsReq);
REQUEST_FIXED_SIZE(xChangeHostsReq, stuff->hostLength);
if (stuff->mode == HostInsert)
return AddHost(client, (int) stuff->hostFamily,
stuff->hostLength, (void *) &stuff[1]);
if (stuff->mode == HostDelete)
... | DoS | 0 | ProcChangeHosts(ClientPtr client)
{
REQUEST(xChangeHostsReq);
REQUEST_FIXED_SIZE(xChangeHostsReq, stuff->hostLength);
if (stuff->mode == HostInsert)
return AddHost(client, (int) stuff->hostFamily,
stuff->hostLength, (void *) &stuff[1]);
if (stuff->mode == HostDelete)
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,004 | ProcChangeSaveSet(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xChangeSaveSetReq);
int rc;
REQUEST_SIZE_MATCH(xChangeSaveSetReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
if (rc != Success)
return rc;
if (client->clientAsMask == (CLIENT_BITS(pWin->drawabl... | DoS | 0 | ProcChangeSaveSet(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xChangeSaveSetReq);
int rc;
REQUEST_SIZE_MATCH(xChangeSaveSetReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
if (rc != Success)
return rc;
if (client->clientAsMask == (CLIENT_BITS(pWin->drawabl... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,005 | ProcChangeWindowAttributes(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xChangeWindowAttributesReq);
int len, rc;
Mask access_mode = 0;
REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
access_mode |= (stuff->valueMask & CWEventMask) ? DixReceiveAccess : 0;
access_mode |= (stuff->valueMask... | DoS | 0 | ProcChangeWindowAttributes(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xChangeWindowAttributesReq);
int len, rc;
Mask access_mode = 0;
REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
access_mode |= (stuff->valueMask & CWEventMask) ? DixReceiveAccess : 0;
access_mode |= (stuff->valueMask... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,006 | ProcClearToBackground(ClientPtr client)
{
REQUEST(xClearAreaReq);
WindowPtr pWin;
int rc;
REQUEST_SIZE_MATCH(xClearAreaReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
if (rc != Success)
return rc;
if (pWin->drawable.class == InputOnly) {
client->err... | DoS | 0 | ProcClearToBackground(ClientPtr client)
{
REQUEST(xClearAreaReq);
WindowPtr pWin;
int rc;
REQUEST_SIZE_MATCH(xClearAreaReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
if (rc != Success)
return rc;
if (pWin->drawable.class == InputOnly) {
client->err... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,007 | ProcCloseFont(ClientPtr client)
{
FontPtr pFont;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupResourceByType((void **) &pFont, stuff->id, RT_FONT,
client, DixDestroyAccess);
if (rc == Success) {
FreeResource(stuff->id, ... | DoS | 0 | ProcCloseFont(ClientPtr client)
{
FontPtr pFont;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupResourceByType((void **) &pFont, stuff->id, RT_FONT,
client, DixDestroyAccess);
if (rc == Success) {
FreeResource(stuff->id, ... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,008 | ProcConfigureWindow(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xConfigureWindowReq);
int len, rc;
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
rc = dixLookupWindow(&pWin, stuff->window, client,
DixManageAccess | DixSetAttrAccess);
if (rc != Success)
return rc;
... | DoS | 0 | ProcConfigureWindow(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xConfigureWindowReq);
int len, rc;
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
rc = dixLookupWindow(&pWin, stuff->window, client,
DixManageAccess | DixSetAttrAccess);
if (rc != Success)
return rc;
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,009 | ProcCopyArea(ClientPtr client)
{
DrawablePtr pDst;
DrawablePtr pSrc;
GC *pGC;
REQUEST(xCopyAreaReq);
RegionPtr pRgn;
int rc;
REQUEST_SIZE_MATCH(xCopyAreaReq);
VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess);
if (stuff->dstDrawable != stuff->srcDrawable) {
... | DoS | 0 | ProcCopyArea(ClientPtr client)
{
DrawablePtr pDst;
DrawablePtr pSrc;
GC *pGC;
REQUEST(xCopyAreaReq);
RegionPtr pRgn;
int rc;
REQUEST_SIZE_MATCH(xCopyAreaReq);
VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess);
if (stuff->dstDrawable != stuff->srcDrawable) {
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,010 | ProcCopyColormapAndFree(ClientPtr client)
{
Colormap mid;
ColormapPtr pSrcMap;
REQUEST(xCopyColormapAndFreeReq);
int rc;
REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
mid = stuff->mid;
LEGAL_NEW_RESOURCE(mid, client);
rc = dixLookupResourceByType((void **) &pSrcMap, stuff->srcCmap,
... | DoS | 0 | ProcCopyColormapAndFree(ClientPtr client)
{
Colormap mid;
ColormapPtr pSrcMap;
REQUEST(xCopyColormapAndFreeReq);
int rc;
REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
mid = stuff->mid;
LEGAL_NEW_RESOURCE(mid, client);
rc = dixLookupResourceByType((void **) &pSrcMap, stuff->srcCmap,
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,011 | ProcCopyGC(ClientPtr client)
{
GC *dstGC;
GC *pGC;
int result;
REQUEST(xCopyGCReq);
REQUEST_SIZE_MATCH(xCopyGCReq);
result = dixLookupGC(&pGC, stuff->srcGC, client, DixGetAttrAccess);
if (result != Success)
return result;
result = dixLookupGC(&dstGC, stuff->dstGC, client, DixSe... | DoS | 0 | ProcCopyGC(ClientPtr client)
{
GC *dstGC;
GC *pGC;
int result;
REQUEST(xCopyGCReq);
REQUEST_SIZE_MATCH(xCopyGCReq);
result = dixLookupGC(&pGC, stuff->srcGC, client, DixGetAttrAccess);
if (result != Success)
return result;
result = dixLookupGC(&dstGC, stuff->dstGC, client, DixSe... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,012 | ProcCreateCursor(ClientPtr client)
{
CursorPtr pCursor;
PixmapPtr src;
PixmapPtr msk;
unsigned char *srcbits;
unsigned char *mskbits;
unsigned short width, height;
long n;
CursorMetricRec cm;
int rc;
REQUEST(xCreateCursorReq);
REQUEST_SIZE_MATCH(xCreateCursorReq);
LEGAL... | DoS | 0 | ProcCreateCursor(ClientPtr client)
{
CursorPtr pCursor;
PixmapPtr src;
PixmapPtr msk;
unsigned char *srcbits;
unsigned char *mskbits;
unsigned short width, height;
long n;
CursorMetricRec cm;
int rc;
REQUEST(xCreateCursorReq);
REQUEST_SIZE_MATCH(xCreateCursorReq);
LEGAL... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,013 | ProcCreateGC(ClientPtr client)
{
int error, rc;
GC *pGC;
DrawablePtr pDraw;
unsigned len;
REQUEST(xCreateGCReq);
REQUEST_AT_LEAST_SIZE(xCreateGCReq);
client->errorValue = stuff->gc;
LEGAL_NEW_RESOURCE(stuff->gc, client);
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
... | DoS | 0 | ProcCreateGC(ClientPtr client)
{
int error, rc;
GC *pGC;
DrawablePtr pDraw;
unsigned len;
REQUEST(xCreateGCReq);
REQUEST_AT_LEAST_SIZE(xCreateGCReq);
client->errorValue = stuff->gc;
LEGAL_NEW_RESOURCE(stuff->gc, client);
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,014 | ProcCreateGlyphCursor(ClientPtr client)
{
CursorPtr pCursor;
int res;
REQUEST(xCreateGlyphCursorReq);
REQUEST_SIZE_MATCH(xCreateGlyphCursorReq);
LEGAL_NEW_RESOURCE(stuff->cid, client);
res = AllocGlyphCursor(stuff->source, stuff->sourceChar,
stuff->mask, stuff->mask... | DoS | 0 | ProcCreateGlyphCursor(ClientPtr client)
{
CursorPtr pCursor;
int res;
REQUEST(xCreateGlyphCursorReq);
REQUEST_SIZE_MATCH(xCreateGlyphCursorReq);
LEGAL_NEW_RESOURCE(stuff->cid, client);
res = AllocGlyphCursor(stuff->source, stuff->sourceChar,
stuff->mask, stuff->mask... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,015 | ProcCreatePixmap(ClientPtr client)
{
PixmapPtr pMap;
DrawablePtr pDraw;
REQUEST(xCreatePixmapReq);
DepthPtr pDepth;
int i, rc;
REQUEST_SIZE_MATCH(xCreatePixmapReq);
client->errorValue = stuff->pid;
LEGAL_NEW_RESOURCE(stuff->pid, client);
rc = dixLookupDrawable(&pDraw, stuff->drawa... | DoS | 0 | ProcCreatePixmap(ClientPtr client)
{
PixmapPtr pMap;
DrawablePtr pDraw;
REQUEST(xCreatePixmapReq);
DepthPtr pDepth;
int i, rc;
REQUEST_SIZE_MATCH(xCreatePixmapReq);
client->errorValue = stuff->pid;
LEGAL_NEW_RESOURCE(stuff->pid, client);
rc = dixLookupDrawable(&pDraw, stuff->drawa... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,016 | ProcCreateWindow(ClientPtr client)
{
WindowPtr pParent, pWin;
REQUEST(xCreateWindowReq);
int len, rc;
REQUEST_AT_LEAST_SIZE(xCreateWindowReq);
LEGAL_NEW_RESOURCE(stuff->wid, client);
rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess);
if (rc != Success)
return rc;... | DoS | 0 | ProcCreateWindow(ClientPtr client)
{
WindowPtr pParent, pWin;
REQUEST(xCreateWindowReq);
int len, rc;
REQUEST_AT_LEAST_SIZE(xCreateWindowReq);
LEGAL_NEW_RESOURCE(stuff->wid, client);
rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess);
if (rc != Success)
return rc;... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,017 | ProcDestroySubwindows(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixRemoveAccess);
if (rc != Success)
return rc;
DestroySubwindows(pWin, client);
return Success;
}
| DoS | 0 | ProcDestroySubwindows(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixRemoveAccess);
if (rc != Success)
return rc;
DestroySubwindows(pWin, client);
return Success;
}
| @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,018 | ProcDestroyWindow(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess);
if (rc != Success)
return rc;
if (pWin->parent) {
rc = dixLookupWindow(&pWin, pWin->paren... | DoS | 0 | ProcDestroyWindow(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess);
if (rc != Success)
return rc;
if (pWin->parent) {
rc = dixLookupWindow(&pWin, pWin->paren... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,019 | ProcEstablishConnection(ClientPtr client)
{
const char *reason;
char *auth_proto, *auth_string;
xConnClientPrefix *prefix;
REQUEST(xReq);
prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq);
auth_proto = (char *) prefix + sz_xConnClientPrefix;
auth_string = auth_proto + pad_to_int32(... | DoS | 0 | ProcEstablishConnection(ClientPtr client)
{
const char *reason;
char *auth_proto, *auth_string;
xConnClientPrefix *prefix;
REQUEST(xReq);
prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq);
auth_proto = (char *) prefix + sz_xConnClientPrefix;
auth_string = auth_proto + pad_to_int32(... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,020 | ProcFreeColormap(ClientPtr client)
{
ColormapPtr pmap;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupResourceByType((void **) &pmap, stuff->id, RT_COLORMAP,
client, DixDestroyAccess);
if (rc == Success) {
/* Freeing a de... | DoS | 0 | ProcFreeColormap(ClientPtr client)
{
ColormapPtr pmap;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupResourceByType((void **) &pmap, stuff->id, RT_COLORMAP,
client, DixDestroyAccess);
if (rc == Success) {
/* Freeing a de... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,021 | ProcFreeColors(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xFreeColorsReq);
REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixRemoveAccess);
if (rc == Success) {
int count... | DoS | 0 | ProcFreeColors(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xFreeColorsReq);
REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixRemoveAccess);
if (rc == Success) {
int count... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,022 | ProcFreeCursor(ClientPtr client)
{
CursorPtr pCursor;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupResourceByType((void **) &pCursor, stuff->id, RT_CURSOR,
client, DixDestroyAccess);
if (rc == Success) {
FreeResource(st... | DoS | 0 | ProcFreeCursor(ClientPtr client)
{
CursorPtr pCursor;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupResourceByType((void **) &pCursor, stuff->id, RT_CURSOR,
client, DixDestroyAccess);
if (rc == Success) {
FreeResource(st... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,023 | ProcFreeGC(ClientPtr client)
{
GC *pGC;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupGC(&pGC, stuff->id, client, DixDestroyAccess);
if (rc != Success)
return rc;
FreeResource(stuff->id, RT_NONE);
return Success;
}
| DoS | 0 | ProcFreeGC(ClientPtr client)
{
GC *pGC;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupGC(&pGC, stuff->id, client, DixDestroyAccess);
if (rc != Success)
return rc;
FreeResource(stuff->id, RT_NONE);
return Success;
}
| @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,024 | ProcFreePixmap(ClientPtr client)
{
PixmapPtr pMap;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupResourceByType((void **) &pMap, stuff->id, RT_PIXMAP,
client, DixDestroyAccess);
if (rc == Success) {
FreeResource(stuff->i... | DoS | 0 | ProcFreePixmap(ClientPtr client)
{
PixmapPtr pMap;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupResourceByType((void **) &pMap, stuff->id, RT_PIXMAP,
client, DixDestroyAccess);
if (rc == Success) {
FreeResource(stuff->i... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,025 | ProcGetFontPath(ClientPtr client)
{
xGetFontPathReply reply;
int rc, stringLens, numpaths;
unsigned char *bufferStart;
/* REQUEST (xReq); */
REQUEST_SIZE_MATCH(xReq);
rc = GetFontPath(client, &numpaths, &stringLens, &bufferStart);
if (rc != Success)
return rc;
reply = (xGetFon... | DoS | 0 | ProcGetFontPath(ClientPtr client)
{
xGetFontPathReply reply;
int rc, stringLens, numpaths;
unsigned char *bufferStart;
/* REQUEST (xReq); */
REQUEST_SIZE_MATCH(xReq);
rc = GetFontPath(client, &numpaths, &stringLens, &bufferStart);
if (rc != Success)
return rc;
reply = (xGetFon... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,026 | ProcGetGeometry(ClientPtr client)
{
xGetGeometryReply rep = { .type = X_Reply };
int status;
if ((status = GetGeometry(client, &rep)) != Success)
return status;
WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep);
return Success;
}
| DoS | 0 | ProcGetGeometry(ClientPtr client)
{
xGetGeometryReply rep = { .type = X_Reply };
int status;
if ((status = GetGeometry(client, &rep)) != Success)
return status;
WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep);
return Success;
}
| @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,027 | ProcGetScreenSaver(ClientPtr client)
{
xGetScreenSaverReply rep;
int rc, i;
REQUEST_SIZE_MATCH(xReq);
for (i = 0; i < screenInfo.numScreens; i++) {
rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i],
DixGetAttrAccess);
if (rc != Success)
... | DoS | 0 | ProcGetScreenSaver(ClientPtr client)
{
xGetScreenSaverReply rep;
int rc, i;
REQUEST_SIZE_MATCH(xReq);
for (i = 0; i < screenInfo.numScreens; i++) {
rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i],
DixGetAttrAccess);
if (rc != Success)
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,028 | ProcGetWindowAttributes(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
xGetWindowAttributesReply wa;
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
if (rc != Success)
return rc;
memset(&wa, 0, sizeof(xGetW... | DoS | 0 | ProcGetWindowAttributes(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
xGetWindowAttributesReply wa;
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
if (rc != Success)
return rc;
memset(&wa, 0, sizeof(xGetW... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,029 | ProcGrabServer(ClientPtr client)
{
int rc;
REQUEST_SIZE_MATCH(xReq);
if (grabState != GrabNone && client != grabClient) {
ResetCurrentRequest(client);
client->sequence--;
BITSET(grabWaiters, client->index);
IgnoreClient(client);
return Success;
}
rc = OnlyLis... | DoS | 0 | ProcGrabServer(ClientPtr client)
{
int rc;
REQUEST_SIZE_MATCH(xReq);
if (grabState != GrabNone && client != grabClient) {
ResetCurrentRequest(client);
client->sequence--;
BITSET(grabWaiters, client->index);
IgnoreClient(client);
return Success;
}
rc = OnlyLis... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,030 | ProcImageText16(ClientPtr client)
{
int err;
DrawablePtr pDraw;
GC *pGC;
REQUEST(xImageTextReq);
REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
err = ImageText(client,
pDraw,
... | DoS | 0 | ProcImageText16(ClientPtr client)
{
int err;
DrawablePtr pDraw;
GC *pGC;
REQUEST(xImageTextReq);
REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
err = ImageText(client,
pDraw,
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,031 | ProcImageText8(ClientPtr client)
{
int err;
DrawablePtr pDraw;
GC *pGC;
REQUEST(xImageTextReq);
REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
err = ImageText(client,
pDraw,
pGC,
... | DoS | 0 | ProcImageText8(ClientPtr client)
{
int err;
DrawablePtr pDraw;
GC *pGC;
REQUEST(xImageTextReq);
REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
err = ImageText(client,
pDraw,
pGC,
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,032 | ProcInitialConnection(ClientPtr client)
{
REQUEST(xReq);
xConnClientPrefix *prefix;
int whichbyte = 1;
char order;
prefix = (xConnClientPrefix *) ((char *)stuff + sz_xReq);
order = prefix->byteOrder;
if (order != 'l' && order != 'B' && order != 'r' && order != 'R')
return client->noClientE... | DoS | 0 | ProcInitialConnection(ClientPtr client)
{
REQUEST(xReq);
xConnClientPrefix *prefix;
int whichbyte = 1;
char order;
prefix = (xConnClientPrefix *) ((char *)stuff + sz_xReq);
order = prefix->byteOrder;
if (order != 'l' && order != 'B' && order != 'r' && order != 'R')
return client->noClientE... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,033 | ProcInstallColormap(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupResourceByType((void **) &pcmp, stuff->id, RT_COLORMAP,
client, DixInstallAccess);
if (rc != Success)
goto out;
... | DoS | 0 | ProcInstallColormap(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupResourceByType((void **) &pcmp, stuff->id, RT_COLORMAP,
client, DixInstallAccess);
if (rc != Success)
goto out;
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,034 | ProcListFontsWithInfo(ClientPtr client)
{
REQUEST(xListFontsWithInfoReq);
REQUEST_FIXED_SIZE(xListFontsWithInfoReq, stuff->nbytes);
return StartListFontsWithInfo(client, stuff->nbytes,
(unsigned char *) &stuff[1], stuff->maxNames);
}
| DoS | 0 | ProcListFontsWithInfo(ClientPtr client)
{
REQUEST(xListFontsWithInfoReq);
REQUEST_FIXED_SIZE(xListFontsWithInfoReq, stuff->nbytes);
return StartListFontsWithInfo(client, stuff->nbytes,
(unsigned char *) &stuff[1], stuff->maxNames);
}
| @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,035 | ProcListInstalledColormaps(ClientPtr client)
{
xListInstalledColormapsReply *preply;
int nummaps, rc;
WindowPtr pWin;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
if (rc != Success)
return rc;
rc = X... | DoS | 0 | ProcListInstalledColormaps(ClientPtr client)
{
xListInstalledColormapsReply *preply;
int nummaps, rc;
WindowPtr pWin;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess);
if (rc != Success)
return rc;
rc = X... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,036 | ProcLookupColor(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xLookupColorReq);
REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes);
rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixReadAccess);
if (rc == Success) {
... | DoS | 0 | ProcLookupColor(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xLookupColorReq);
REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes);
rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixReadAccess);
if (rc == Success) {
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,037 | ProcMapWindow(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixShowAccess);
if (rc != Success)
return rc;
MapWindow(pWin, client);
/* update cache to say it is mapped */
re... | DoS | 0 | ProcMapWindow(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixShowAccess);
if (rc != Success)
return rc;
MapWindow(pWin, client);
/* update cache to say it is mapped */
re... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,038 | ProcNoOperation(ClientPtr client)
{
REQUEST_AT_LEAST_SIZE(xReq);
/* noop -- don't do anything */
return Success;
}
| DoS | 0 | ProcNoOperation(ClientPtr client)
{
REQUEST_AT_LEAST_SIZE(xReq);
/* noop -- don't do anything */
return Success;
}
| @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,039 | ProcOpenFont(ClientPtr client)
{
int err;
REQUEST(xOpenFontReq);
REQUEST_FIXED_SIZE(xOpenFontReq, stuff->nbytes);
client->errorValue = stuff->fid;
LEGAL_NEW_RESOURCE(stuff->fid, client);
err = OpenFont(client, stuff->fid, (Mask) 0,
stuff->nbytes, (char *) &stuff[1]);
if ... | DoS | 0 | ProcOpenFont(ClientPtr client)
{
int err;
REQUEST(xOpenFontReq);
REQUEST_FIXED_SIZE(xOpenFontReq, stuff->nbytes);
client->errorValue = stuff->fid;
LEGAL_NEW_RESOURCE(stuff->fid, client);
err = OpenFont(client, stuff->fid, (Mask) 0,
stuff->nbytes, (char *) &stuff[1]);
if ... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,040 | ProcPolyFillArc(ClientPtr client)
{
int narcs;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolyFillArcReq);
REQUEST_AT_LEAST_SIZE(xPolyFillArcReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq);
if (narcs % sizeof(xA... | DoS | 0 | ProcPolyFillArc(ClientPtr client)
{
int narcs;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolyFillArcReq);
REQUEST_AT_LEAST_SIZE(xPolyFillArcReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq);
if (narcs % sizeof(xA... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,041 | ProcPolyFillRectangle(ClientPtr client)
{
int things;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolyFillRectangleReq);
REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq);... | DoS | 0 | ProcPolyFillRectangle(ClientPtr client)
{
int things;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolyFillRectangleReq);
REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq);... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,042 | ProcPolyLine(ClientPtr client)
{
int npoint;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolyLineReq);
REQUEST_AT_LEAST_SIZE(xPolyLineReq);
if ((stuff->coordMode != CoordModeOrigin) &&
(stuff->coordMode != CoordModePrevious)) {
client->errorValue = stuff->coordMode;
return Bad... | DoS | 0 | ProcPolyLine(ClientPtr client)
{
int npoint;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolyLineReq);
REQUEST_AT_LEAST_SIZE(xPolyLineReq);
if ((stuff->coordMode != CoordModeOrigin) &&
(stuff->coordMode != CoordModePrevious)) {
client->errorValue = stuff->coordMode;
return Bad... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,043 | ProcPolyPoint(ClientPtr client)
{
int npoint;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolyPointReq);
REQUEST_AT_LEAST_SIZE(xPolyPointReq);
if ((stuff->coordMode != CoordModeOrigin) &&
(stuff->coordMode != CoordModePrevious)) {
client->errorValue = stuff->coordMode;
return ... | DoS | 0 | ProcPolyPoint(ClientPtr client)
{
int npoint;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolyPointReq);
REQUEST_AT_LEAST_SIZE(xPolyPointReq);
if ((stuff->coordMode != CoordModeOrigin) &&
(stuff->coordMode != CoordModePrevious)) {
client->errorValue = stuff->coordMode;
return ... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,044 | ProcPolyRectangle(ClientPtr client)
{
int nrects;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolyRectangleReq);
REQUEST_AT_LEAST_SIZE(xPolyRectangleReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq);
if (nrects ... | DoS | 0 | ProcPolyRectangle(ClientPtr client)
{
int nrects;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolyRectangleReq);
REQUEST_AT_LEAST_SIZE(xPolyRectangleReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq);
if (nrects ... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,045 | ProcPolySegment(ClientPtr client)
{
int nsegs;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolySegmentReq);
REQUEST_AT_LEAST_SIZE(xPolySegmentReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq);
if (nsegs & 4)
... | DoS | 0 | ProcPolySegment(ClientPtr client)
{
int nsegs;
GC *pGC;
DrawablePtr pDraw;
REQUEST(xPolySegmentReq);
REQUEST_AT_LEAST_SIZE(xPolySegmentReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq);
if (nsegs & 4)
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,046 | ProcPolyText(ClientPtr client)
{
int err;
REQUEST(xPolyTextReq);
DrawablePtr pDraw;
GC *pGC;
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
err = PolyText(client,
pDraw,
pGC,
(... | DoS | 0 | ProcPolyText(ClientPtr client)
{
int err;
REQUEST(xPolyTextReq);
DrawablePtr pDraw;
GC *pGC;
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
err = PolyText(client,
pDraw,
pGC,
(... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,047 | ProcQueryBestSize(ClientPtr client)
{
xQueryBestSizeReply reply;
DrawablePtr pDraw;
ScreenPtr pScreen;
int rc;
REQUEST(xQueryBestSizeReq);
REQUEST_SIZE_MATCH(xQueryBestSizeReq);
if ((stuff->class != CursorShape) &&
(stuff->class != TileShape) && (stuff->class != StippleShape)) {
... | DoS | 0 | ProcQueryBestSize(ClientPtr client)
{
xQueryBestSizeReply reply;
DrawablePtr pDraw;
ScreenPtr pScreen;
int rc;
REQUEST(xQueryBestSizeReq);
REQUEST_SIZE_MATCH(xQueryBestSizeReq);
if ((stuff->class != CursorShape) &&
(stuff->class != TileShape) && (stuff->class != StippleShape)) {
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,048 | ProcQueryColors(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xQueryColorsReq);
REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixReadAccess);
if (rc == Success) {
int coun... | DoS | 0 | ProcQueryColors(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xQueryColorsReq);
REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixReadAccess);
if (rc == Success) {
int coun... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,049 | ProcQueryFont(ClientPtr client)
{
xQueryFontReply *reply;
FontPtr pFont;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess);
if (rc != Success)
return rc;
{
xCharInfo *pmax = FONTINKMAX(p... | DoS | 0 | ProcQueryFont(ClientPtr client)
{
xQueryFontReply *reply;
FontPtr pFont;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess);
if (rc != Success)
return rc;
{
xCharInfo *pmax = FONTINKMAX(p... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,050 | ProcQueryTextExtents(ClientPtr client)
{
xQueryTextExtentsReply reply;
FontPtr pFont;
ExtentInfoRec info;
unsigned long length;
int rc;
REQUEST(xQueryTextExtentsReq);
REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq);
rc = dixLookupFontable(&pFont, stuff->fid, client, DixGetAttrAccess);
... | DoS | 0 | ProcQueryTextExtents(ClientPtr client)
{
xQueryTextExtentsReply reply;
FontPtr pFont;
ExtentInfoRec info;
unsigned long length;
int rc;
REQUEST(xQueryTextExtentsReq);
REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq);
rc = dixLookupFontable(&pFont, stuff->fid, client, DixGetAttrAccess);
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,051 | ProcQueryTree(ClientPtr client)
{
xQueryTreeReply reply;
int rc, numChildren = 0;
WindowPtr pChild, pWin, pHead;
Window *childIDs = (Window *) NULL;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess);
if (rc != Success... | DoS | 0 | ProcQueryTree(ClientPtr client)
{
xQueryTreeReply reply;
int rc, numChildren = 0;
WindowPtr pChild, pWin, pHead;
Window *childIDs = (Window *) NULL;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess);
if (rc != Success... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,052 | ProcReparentWindow(ClientPtr client)
{
WindowPtr pWin, pParent;
REQUEST(xReparentWindowReq);
int rc;
REQUEST_SIZE_MATCH(xReparentWindowReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
if (rc != Success)
return rc;
rc = dixLookupWindow(&pParent, stuff->pare... | DoS | 0 | ProcReparentWindow(ClientPtr client)
{
WindowPtr pWin, pParent;
REQUEST(xReparentWindowReq);
int rc;
REQUEST_SIZE_MATCH(xReparentWindowReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess);
if (rc != Success)
return rc;
rc = dixLookupWindow(&pParent, stuff->pare... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,053 | ProcSetClipRectangles(ClientPtr client)
{
int nr, result;
GC *pGC;
REQUEST(xSetClipRectanglesReq);
REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
if ((stuff->ordering != Unsorted) && (stuff->ordering != YSorted) &&
(stuff->ordering != YXSorted) && (stuff->ordering != YXBanded)) {
cl... | DoS | 0 | ProcSetClipRectangles(ClientPtr client)
{
int nr, result;
GC *pGC;
REQUEST(xSetClipRectanglesReq);
REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
if ((stuff->ordering != Unsorted) && (stuff->ordering != YSorted) &&
(stuff->ordering != YXSorted) && (stuff->ordering != YXBanded)) {
cl... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,054 | ProcSetScreenSaver(ClientPtr client)
{
int rc, i, blankingOption, exposureOption;
REQUEST(xSetScreenSaverReq);
REQUEST_SIZE_MATCH(xSetScreenSaverReq);
for (i = 0; i < screenInfo.numScreens; i++) {
rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i],
DixSe... | DoS | 0 | ProcSetScreenSaver(ClientPtr client)
{
int rc, i, blankingOption, exposureOption;
REQUEST(xSetScreenSaverReq);
REQUEST_SIZE_MATCH(xSetScreenSaverReq);
for (i = 0; i < screenInfo.numScreens; i++) {
rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i],
DixSe... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,055 | ProcStoreColors(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xStoreColorsReq);
REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixWriteAccess);
if (rc == Success) {
int cou... | DoS | 0 | ProcStoreColors(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xStoreColorsReq);
REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixWriteAccess);
if (rc == Success) {
int cou... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,056 | ProcStoreNamedColor(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xStoreNamedColorReq);
REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes);
rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixWriteAccess);
if (rc == Su... | DoS | 0 | ProcStoreNamedColor(ClientPtr client)
{
ColormapPtr pcmp;
int rc;
REQUEST(xStoreNamedColorReq);
REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes);
rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP,
client, DixWriteAccess);
if (rc == Su... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,057 | ProcTranslateCoords(ClientPtr client)
{
REQUEST(xTranslateCoordsReq);
WindowPtr pWin, pDst;
xTranslateCoordsReply rep;
int rc;
REQUEST_SIZE_MATCH(xTranslateCoordsReq);
rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixGetAttrAccess);
if (rc != Success)
return rc;
rc = dixLo... | DoS | 0 | ProcTranslateCoords(ClientPtr client)
{
REQUEST(xTranslateCoordsReq);
WindowPtr pWin, pDst;
xTranslateCoordsReply rep;
int rc;
REQUEST_SIZE_MATCH(xTranslateCoordsReq);
rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixGetAttrAccess);
if (rc != Success)
return rc;
rc = dixLo... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,058 | ProcUngrabServer(ClientPtr client)
{
REQUEST_SIZE_MATCH(xReq);
UngrabServer(client);
return Success;
}
| DoS | 0 | ProcUngrabServer(ClientPtr client)
{
REQUEST_SIZE_MATCH(xReq);
UngrabServer(client);
return Success;
}
| @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,059 | ProcUnmapSubwindows(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess);
if (rc != Success)
return rc;
UnmapSubwindows(pWin);
return Success;
}
| DoS | 0 | ProcUnmapSubwindows(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess);
if (rc != Success)
return rc;
UnmapSubwindows(pWin);
return Success;
}
| @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,060 | ProcUnmapWindow(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixHideAccess);
if (rc != Success)
return rc;
UnmapWindow(pWin, FALSE);
/* update cache to say it is mapped */
... | DoS | 0 | ProcUnmapWindow(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixHideAccess);
if (rc != Success)
return rc;
UnmapWindow(pWin, FALSE);
/* update cache to say it is mapped */
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,061 | ReformatImage(char *base, int nbytes, int bpp, int order)
{
switch (bpp) {
case 1: /* yuck */
if (BITMAP_BIT_ORDER != order)
BitOrderInvert((unsigned char *) base, nbytes);
#if IMAGE_BYTE_ORDER != BITMAP_BIT_ORDER && BITMAP_SCANLINE_UNIT != 8
ReformatImage(base, nb... | DoS | 0 | ReformatImage(char *base, int nbytes, int bpp, int order)
{
switch (bpp) {
case 1: /* yuck */
if (BITMAP_BIT_ORDER != order)
BitOrderInvert((unsigned char *) base, nbytes);
#if IMAGE_BYTE_ORDER != BITMAP_BIT_ORDER && BITMAP_SCANLINE_UNIT != 8
ReformatImage(base, nb... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,062 | SendConnSetup(ClientPtr client, const char *reason)
{
xWindowRoot *root;
int i;
int numScreens;
char *lConnectionInfo;
xConnSetupPrefix *lconnSetupPrefix;
if (reason) {
xConnSetupPrefix csp;
csp.success = xFalse;
csp.lengthReason = strlen(reason);
csp.length = b... | DoS | 0 | SendConnSetup(ClientPtr client, const char *reason)
{
xWindowRoot *root;
int i;
int numScreens;
char *lConnectionInfo;
xConnSetupPrefix *lconnSetupPrefix;
if (reason) {
xConnSetupPrefix csp;
csp.success = xFalse;
csp.lengthReason = strlen(reason);
csp.length = b... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,063 | SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode,
XID resId, int errorCode)
{
xError rep = {
.type = X_Error,
.errorCode = errorCode,
.resourceID = resId,
.minorCode = minorCode,
.majorCode = majorCode
};
WriteEventsToClien... | DoS | 0 | SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode,
XID resId, int errorCode)
{
xError rep = {
.type = X_Error,
.errorCode = errorCode,
.resourceID = resId,
.minorCode = minorCode,
.majorCode = majorCode
};
WriteEventsToClien... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,064 | ServerOrder(void)
{
int whichbyte = 1;
if (*((char *) &whichbyte))
return LSBFirst;
return MSBFirst;
}
| DoS | 0 | ServerOrder(void)
{
int whichbyte = 1;
if (*((char *) &whichbyte))
return LSBFirst;
return MSBFirst;
}
| @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,065 | SetVendorRelease(int release)
{
VendorRelease = release;
}
| DoS | 0 | SetVendorRelease(int release)
{
VendorRelease = release;
}
| @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,066 | SetVendorString(const char *vendor)
{
VendorString = vendor;
}
| DoS | 0 | SetVendorString(const char *vendor)
{
VendorString = vendor;
}
| @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,067 | SmartScheduleClient(int *clientReady, int nready)
{
ClientPtr pClient;
int i;
int client;
int bestPrio, best = 0;
int bestRobin, robin;
long now = SmartScheduleTime;
long idle;
bestPrio = -0x7fffffff;
bestRobin = 0;
idle = 2 * SmartScheduleSlice;
for (i = 0; i < nready; i++)... | DoS | 0 | SmartScheduleClient(int *clientReady, int nready)
{
ClientPtr pClient;
int i;
int client;
int bestPrio, best = 0;
int bestRobin, robin;
long now = SmartScheduleTime;
long idle;
bestPrio = -0x7fffffff;
bestRobin = 0;
idle = 2 * SmartScheduleSlice;
for (i = 0; i < nready; i++)... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,068 | UngrabServer(ClientPtr client)
{
int i;
grabState = GrabNone;
ListenToAllClients();
for (i = mskcnt; --i >= 0 && !grabWaiters[i];);
if (i >= 0) {
i <<= 5;
while (!GETBIT(grabWaiters, i))
i++;
BITCLEAR(grabWaiters, i);
AttendClient(clients[i]);
}
... | DoS | 0 | UngrabServer(ClientPtr client)
{
int i;
grabState = GrabNone;
ListenToAllClients();
for (i = mskcnt; --i >= 0 && !grabWaiters[i];);
if (i >= 0) {
i <<= 5;
while (!GETBIT(grabWaiters, i))
i++;
BITCLEAR(grabWaiters, i);
AttendClient(clients[i]);
}
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,069 | UpdateCurrentTime(void)
{
TimeStamp systime;
/* To avoid time running backwards, we must call GetTimeInMillis before
* calling ProcessInputEvents.
*/
systime.months = currentTime.months;
systime.milliseconds = GetTimeInMillis();
if (systime.milliseconds < currentTime.milliseconds)
... | DoS | 0 | UpdateCurrentTime(void)
{
TimeStamp systime;
/* To avoid time running backwards, we must call GetTimeInMillis before
* calling ProcessInputEvents.
*/
systime.months = currentTime.months;
systime.milliseconds = GetTimeInMillis();
if (systime.milliseconds < currentTime.milliseconds)
... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,070 | dixDestroyPixmap(void *value, XID pid)
{
PixmapPtr pPixmap = (PixmapPtr) value;
return (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
}
| DoS | 0 | dixDestroyPixmap(void *value, XID pid)
{
PixmapPtr pPixmap = (PixmapPtr) value;
return (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
}
| @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,071 | static int init_screen(ScreenPtr pScreen, int i, Bool gpu)
{
int scanlinepad, format, depth, bitsPerPixel, j, k;
dixInitScreenSpecificPrivates(pScreen);
if (!dixAllocatePrivates(&pScreen->devPrivates, PRIVATE_SCREEN)) {
return -1;
}
pScreen->myNum = i;
if (gpu) {
pScreen->myNum... | DoS | 0 | static int init_screen(ScreenPtr pScreen, int i, Bool gpu)
{
int scanlinepad, format, depth, bitsPerPixel, j, k;
dixInitScreenSpecificPrivates(pScreen);
if (!dixAllocatePrivates(&pScreen->devPrivates, PRIVATE_SCREEN)) {
return -1;
}
pScreen->myNum = i;
if (gpu) {
pScreen->myNum... | @@ -2000,7 +2000,7 @@ ProcPutImage(ClientPtr client)
tmpImage = (char *) &stuff[1];
lengthProto = length;
- if (lengthProto >= (INT32_MAX / stuff->height))
+ if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height))
return BadLength;
if ((bytes_to_int32(lengthProto * stuff-... | CWE-369 | null | null |
12,072 | PHP_FUNCTION(dom_document_create_document_fragment)
{
zval *id;
xmlNode *node;
xmlDocPtr docp;
dom_object *intern;
int ret;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) {
return;
}
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
node = x... | Bypass | 0 | PHP_FUNCTION(dom_document_create_document_fragment)
{
zval *id;
xmlNode *node;
xmlDocPtr docp;
dom_object *intern;
int ret;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) {
return;
}
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
node = x... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,073 | PHP_FUNCTION(dom_document_create_text_node)
{
zval *id;
xmlNode *node;
xmlDocPtr docp;
int ret, value_len;
dom_object *intern;
char *value;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
return;
}
DOM_GET_OBJ(doc... | Bypass | 0 | PHP_FUNCTION(dom_document_create_text_node)
{
zval *id;
xmlNode *node;
xmlDocPtr docp;
int ret, value_len;
dom_object *intern;
char *value;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
return;
}
DOM_GET_OBJ(doc... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,074 | PHP_FUNCTION(dom_document_create_comment)
{
zval *id;
xmlNode *node;
xmlDocPtr docp;
int ret, value_len;
dom_object *intern;
char *value;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
return;
}
DOM_GET_OBJ(docp,... | Bypass | 0 | PHP_FUNCTION(dom_document_create_comment)
{
zval *id;
xmlNode *node;
xmlDocPtr docp;
int ret, value_len;
dom_object *intern;
char *value;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
return;
}
DOM_GET_OBJ(docp,... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,075 | PHP_FUNCTION(dom_document_create_cdatasection)
{
zval *id;
xmlNode *node;
xmlDocPtr docp;
int ret, value_len;
dom_object *intern;
char *value;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
return;
}
DOM_GET_OBJ(... | Bypass | 0 | PHP_FUNCTION(dom_document_create_cdatasection)
{
zval *id;
xmlNode *node;
xmlDocPtr docp;
int ret, value_len;
dom_object *intern;
char *value;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) {
return;
}
DOM_GET_OBJ(... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,076 | PHP_FUNCTION(dom_document_create_attribute)
{
zval *id;
xmlAttrPtr node;
xmlDocPtr docp;
int ret, name_len;
dom_object *intern;
char *name;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
return;
}
DOM_GET_OBJ(docp,... | Bypass | 0 | PHP_FUNCTION(dom_document_create_attribute)
{
zval *id;
xmlAttrPtr node;
xmlDocPtr docp;
int ret, name_len;
dom_object *intern;
char *name;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
return;
}
DOM_GET_OBJ(docp,... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,077 | PHP_FUNCTION(dom_document_create_entity_reference)
{
zval *id;
xmlNode *node;
xmlDocPtr docp = NULL;
dom_object *intern;
int ret, name_len;
char *name;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
return;
}
DOM_G... | Bypass | 0 | PHP_FUNCTION(dom_document_create_entity_reference)
{
zval *id;
xmlNode *node;
xmlDocPtr docp = NULL;
dom_object *intern;
int ret, name_len;
char *name;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
return;
}
DOM_G... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,078 | PHP_FUNCTION(dom_document_get_elements_by_tag_name)
{
zval *id;
xmlDocPtr docp;
int name_len;
dom_object *intern, *namednode;
char *name;
xmlChar *local;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
return;
}
DOM... | Bypass | 0 | PHP_FUNCTION(dom_document_get_elements_by_tag_name)
{
zval *id;
xmlDocPtr docp;
int name_len;
dom_object *intern, *namednode;
char *name;
xmlChar *local;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) {
return;
}
DOM... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,079 | PHP_FUNCTION(dom_document_import_node)
{
zval *id, *node;
xmlDocPtr docp;
xmlNodePtr nodep, retnodep;
dom_object *intern, *nodeobj;
int ret;
long recursive = 0;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive)... | Bypass | 0 | PHP_FUNCTION(dom_document_import_node)
{
zval *id, *node;
xmlDocPtr docp;
xmlNodePtr nodep, retnodep;
dom_object *intern, *nodeobj;
int ret;
long recursive = 0;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive)... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,080 | PHP_FUNCTION(dom_document_create_element_ns)
{
zval *id;
xmlDocPtr docp;
xmlNodePtr nodep = NULL;
xmlNsPtr nsptr = NULL;
int ret, uri_len = 0, name_len = 0, value_len = 0;
char *uri, *name, *value = NULL;
char *localname = NULL, *prefix = NULL;
int errorcode;
dom_object *intern;
if (zend_parse_method_paramet... | Bypass | 0 | PHP_FUNCTION(dom_document_create_element_ns)
{
zval *id;
xmlDocPtr docp;
xmlNodePtr nodep = NULL;
xmlNsPtr nsptr = NULL;
int ret, uri_len = 0, name_len = 0, value_len = 0;
char *uri, *name, *value = NULL;
char *localname = NULL, *prefix = NULL;
int errorcode;
dom_object *intern;
if (zend_parse_method_paramet... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,081 | PHP_FUNCTION(dom_document_get_elements_by_tag_name_ns)
{
zval *id;
xmlDocPtr docp;
int uri_len, name_len;
dom_object *intern, *namednode;
char *uri, *name;
xmlChar *local, *nsuri;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_document_class_entry, &uri, &uri_len, &name, ... | Bypass | 0 | PHP_FUNCTION(dom_document_get_elements_by_tag_name_ns)
{
zval *id;
xmlDocPtr docp;
int uri_len, name_len;
dom_object *intern, *namednode;
char *uri, *name;
xmlChar *local, *nsuri;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_document_class_entry, &uri, &uri_len, &name, ... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,082 | PHP_FUNCTION(dom_document_get_element_by_id)
{
zval *id;
xmlDocPtr docp;
xmlAttrPtr attrp;
int ret, idname_len;
dom_object *intern;
char *idname;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &idname, &idname_len) == FAILURE) {
return;
}
DOM_GE... | Bypass | 0 | PHP_FUNCTION(dom_document_get_element_by_id)
{
zval *id;
xmlDocPtr docp;
xmlAttrPtr attrp;
int ret, idname_len;
dom_object *intern;
char *idname;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &idname, &idname_len) == FAILURE) {
return;
}
DOM_GE... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,083 | PHP_FUNCTION(dom_document_rename_node)
{
DOM_NOT_IMPLEMENTED();
}
| Bypass | 0 | PHP_FUNCTION(dom_document_rename_node)
{
DOM_NOT_IMPLEMENTED();
}
| @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,084 | PHP_FUNCTION(dom_document_save_html_file)
{
zval *id;
xmlDoc *docp;
int file_len, bytes, format;
dom_object *intern;
dom_doc_propsptr doc_props;
char *file;
const char *encoding;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &file, &file_len) == FAI... | Bypass | 0 | PHP_FUNCTION(dom_document_save_html_file)
{
zval *id;
xmlDoc *docp;
int file_len, bytes, format;
dom_object *intern;
dom_doc_propsptr doc_props;
char *file;
const char *encoding;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &file, &file_len) == FAI... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,085 | PHP_FUNCTION(dom_document_save_html)
{
zval *id, *nodep = NULL;
xmlDoc *docp;
xmlNode *node;
xmlBufferPtr buf;
dom_object *intern, *nodeobj;
xmlChar *mem = NULL;
int size = 0, format;
dom_doc_propsptr doc_props;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
"O|O!", &id, dom_document... | Bypass | 0 | PHP_FUNCTION(dom_document_save_html)
{
zval *id, *nodep = NULL;
xmlDoc *docp;
xmlNode *node;
xmlBufferPtr buf;
dom_object *intern, *nodeobj;
xmlChar *mem = NULL;
int size = 0, format;
dom_doc_propsptr doc_props;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
"O|O!", &id, dom_document... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,086 | PHP_METHOD(domdocument, __construct)
{
zval *id;
xmlDoc *docp = NULL, *olddoc;
dom_object *intern;
char *encoding, *version = NULL;
int encoding_len = 0, version_len = 0, refcount;
zend_error_handling error_handling;
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC)... | Bypass | 0 | PHP_METHOD(domdocument, __construct)
{
zval *id;
xmlDoc *docp = NULL, *olddoc;
dom_object *intern;
char *encoding, *version = NULL;
int encoding_len = 0, version_len = 0, refcount;
zend_error_handling error_handling;
zend_replace_error_handling(EH_THROW, dom_domexception_class_entry, &error_handling TSRMLS_CC)... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,087 | PHP_METHOD(domdocument, loadHTMLFile)
{
dom_load_html(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE);
}
| Bypass | 0 | PHP_METHOD(domdocument, loadHTMLFile)
{
dom_load_html(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE);
}
| @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,088 | int dom_document_config_read(dom_object *obj, zval **retval TSRMLS_DC)
{
ALLOC_ZVAL(*retval);
ZVAL_NULL(*retval);
return SUCCESS;
}
| Bypass | 0 | int dom_document_config_read(dom_object *obj, zval **retval TSRMLS_DC)
{
ALLOC_ZVAL(*retval);
ZVAL_NULL(*retval);
return SUCCESS;
}
| @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,089 | int dom_document_doctype_read(dom_object *obj, zval **retval TSRMLS_DC)
{
xmlDoc *docp;
xmlDtdPtr dtdptr;
int ret;
docp = (xmlDocPtr) dom_object_get_node(obj);
if (docp == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
return FAILURE;
}
ALLOC_ZVAL(*retval);
dtdptr = xmlGetIntSubset(docp);
... | Bypass | 0 | int dom_document_doctype_read(dom_object *obj, zval **retval TSRMLS_DC)
{
xmlDoc *docp;
xmlDtdPtr dtdptr;
int ret;
docp = (xmlDocPtr) dom_object_get_node(obj);
if (docp == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
return FAILURE;
}
ALLOC_ZVAL(*retval);
dtdptr = xmlGetIntSubset(docp);
... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,090 | int dom_document_document_element_read(dom_object *obj, zval **retval TSRMLS_DC)
{
xmlDoc *docp;
xmlNode *root;
int ret;
docp = (xmlDocPtr) dom_object_get_node(obj);
if (docp == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
return FAILURE;
}
ALLOC_ZVAL(*retval);
root = xmlDocGetRootElemen... | Bypass | 0 | int dom_document_document_element_read(dom_object *obj, zval **retval TSRMLS_DC)
{
xmlDoc *docp;
xmlNode *root;
int ret;
docp = (xmlDocPtr) dom_object_get_node(obj);
if (docp == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
return FAILURE;
}
ALLOC_ZVAL(*retval);
root = xmlDocGetRootElemen... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,091 | int dom_document_document_uri_read(dom_object *obj, zval **retval TSRMLS_DC)
{
xmlDoc *docp;
char *url;
docp = (xmlDocPtr) dom_object_get_node(obj);
if (docp == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
return FAILURE;
}
ALLOC_ZVAL(*retval);
url = (char *) docp->URL;
if (url != NULL) {... | Bypass | 0 | int dom_document_document_uri_read(dom_object *obj, zval **retval TSRMLS_DC)
{
xmlDoc *docp;
char *url;
docp = (xmlDocPtr) dom_object_get_node(obj);
if (docp == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
return FAILURE;
}
ALLOC_ZVAL(*retval);
url = (char *) docp->URL;
if (url != NULL) {... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,092 | int dom_document_format_output_read(dom_object *obj, zval **retval TSRMLS_DC)
{
dom_doc_propsptr doc_prop;
ALLOC_ZVAL(*retval);
if (obj->document) {
doc_prop = dom_get_doc_props(obj->document);
ZVAL_BOOL(*retval, doc_prop->formatoutput);
} else {
ZVAL_FALSE(*retval);
}
return SUCCESS;
}
| Bypass | 0 | int dom_document_format_output_read(dom_object *obj, zval **retval TSRMLS_DC)
{
dom_doc_propsptr doc_prop;
ALLOC_ZVAL(*retval);
if (obj->document) {
doc_prop = dom_get_doc_props(obj->document);
ZVAL_BOOL(*retval, doc_prop->formatoutput);
} else {
ZVAL_FALSE(*retval);
}
return SUCCESS;
}
| @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,093 | int dom_document_format_output_write(dom_object *obj, zval *newval TSRMLS_DC)
{
zval value_copy;
dom_doc_propsptr doc_prop;
if(Z_REFCOUNT_P(newval) > 1) {
value_copy = *newval;
zval_copy_ctor(&value_copy);
newval = &value_copy;
}
convert_to_boolean(newval);
if (obj->document) {
doc_prop = dom_get_doc_pr... | Bypass | 0 | int dom_document_format_output_write(dom_object *obj, zval *newval TSRMLS_DC)
{
zval value_copy;
dom_doc_propsptr doc_prop;
if(Z_REFCOUNT_P(newval) > 1) {
value_copy = *newval;
zval_copy_ctor(&value_copy);
newval = &value_copy;
}
convert_to_boolean(newval);
if (obj->document) {
doc_prop = dom_get_doc_pr... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,094 | int dom_document_implementation_read(dom_object *obj, zval **retval TSRMLS_DC)
{
ALLOC_ZVAL(*retval);
php_dom_create_implementation(retval TSRMLS_CC);
return SUCCESS;
}
| Bypass | 0 | int dom_document_implementation_read(dom_object *obj, zval **retval TSRMLS_DC)
{
ALLOC_ZVAL(*retval);
php_dom_create_implementation(retval TSRMLS_CC);
return SUCCESS;
}
| @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,095 | int dom_document_preserve_whitespace_read(dom_object *obj, zval **retval TSRMLS_DC)
{
dom_doc_propsptr doc_prop;
ALLOC_ZVAL(*retval);
if (obj->document) {
doc_prop = dom_get_doc_props(obj->document);
ZVAL_BOOL(*retval, doc_prop->preservewhitespace);
} else {
ZVAL_FALSE(*retval);
}
return SUCCESS;
}
| Bypass | 0 | int dom_document_preserve_whitespace_read(dom_object *obj, zval **retval TSRMLS_DC)
{
dom_doc_propsptr doc_prop;
ALLOC_ZVAL(*retval);
if (obj->document) {
doc_prop = dom_get_doc_props(obj->document);
ZVAL_BOOL(*retval, doc_prop->preservewhitespace);
} else {
ZVAL_FALSE(*retval);
}
return SUCCESS;
}
| @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,096 | int dom_document_preserve_whitespace_write(dom_object *obj, zval *newval TSRMLS_DC)
{
zval value_copy;
dom_doc_propsptr doc_prop;
if(Z_REFCOUNT_P(newval) > 1) {
value_copy = *newval;
zval_copy_ctor(&value_copy);
newval = &value_copy;
}
convert_to_boolean(newval);
if (obj->document) {
doc_prop = dom_get_... | Bypass | 0 | int dom_document_preserve_whitespace_write(dom_object *obj, zval *newval TSRMLS_DC)
{
zval value_copy;
dom_doc_propsptr doc_prop;
if(Z_REFCOUNT_P(newval) > 1) {
value_copy = *newval;
zval_copy_ctor(&value_copy);
newval = &value_copy;
}
convert_to_boolean(newval);
if (obj->document) {
doc_prop = dom_get_... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,097 | int dom_document_recover_read(dom_object *obj, zval **retval TSRMLS_DC)
{
dom_doc_propsptr doc_prop;
ALLOC_ZVAL(*retval);
if (obj->document) {
doc_prop = dom_get_doc_props(obj->document);
ZVAL_BOOL(*retval, doc_prop->recover);
} else {
ZVAL_FALSE(*retval);
}
return SUCCESS;
}
| Bypass | 0 | int dom_document_recover_read(dom_object *obj, zval **retval TSRMLS_DC)
{
dom_doc_propsptr doc_prop;
ALLOC_ZVAL(*retval);
if (obj->document) {
doc_prop = dom_get_doc_props(obj->document);
ZVAL_BOOL(*retval, doc_prop->recover);
} else {
ZVAL_FALSE(*retval);
}
return SUCCESS;
}
| @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,098 | int dom_document_recover_write(dom_object *obj, zval *newval TSRMLS_DC)
{
zval value_copy;
dom_doc_propsptr doc_prop;
if(Z_REFCOUNT_P(newval) > 1) {
value_copy = *newval;
zval_copy_ctor(&value_copy);
newval = &value_copy;
}
convert_to_boolean(newval);
if (obj->document) {
doc_prop = dom_get_doc_props(ob... | Bypass | 0 | int dom_document_recover_write(dom_object *obj, zval *newval TSRMLS_DC)
{
zval value_copy;
dom_doc_propsptr doc_prop;
if(Z_REFCOUNT_P(newval) > 1) {
value_copy = *newval;
zval_copy_ctor(&value_copy);
newval = &value_copy;
}
convert_to_boolean(newval);
if (obj->document) {
doc_prop = dom_get_doc_props(ob... | @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
12,099 | int dom_document_resolve_externals_read(dom_object *obj, zval **retval TSRMLS_DC)
{
dom_doc_propsptr doc_prop;
ALLOC_ZVAL(*retval);
if (obj->document) {
doc_prop = dom_get_doc_props(obj->document);
ZVAL_BOOL(*retval, doc_prop->resolveexternals);
} else {
ZVAL_FALSE(*retval);
}
return SUCCESS;
}
| Bypass | 0 | int dom_document_resolve_externals_read(dom_object *obj, zval **retval TSRMLS_DC)
{
dom_doc_propsptr doc_prop;
ALLOC_ZVAL(*retval);
if (obj->document) {
doc_prop = dom_get_doc_props(obj->document);
ZVAL_BOOL(*retval, doc_prop->resolveexternals);
} else {
ZVAL_FALSE(*retval);
}
return SUCCESS;
}
| @@ -1580,6 +1580,9 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
xmlInitParser();
if (mode == DOM_LOAD_FILE) {
+ if (CHECK_NULL_PATH(source, source_len)) {
+ return NULL;
+ }
char *file_dest = _dom_... | CWE-254 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.