Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 172575 | Differences between
and this patch

Collapse All | Expand All

(-)Xext/xcmisc.c (-2 / +11 lines)
Lines 42-47 Link Here
42
#include <X11/extensions/xcmiscstr.h>
42
#include <X11/extensions/xcmiscstr.h>
43
#include "modinit.h"
43
#include "modinit.h"
44
44
45
#if HAVE_STDINT_H
46
#include <stdint.h>
47
#elif !defined(UINT32_MAX)
48
#define UINT32_MAX 0xffffffffU
49
#endif
50
45
#if 0
51
#if 0
46
static unsigned char XCMiscCode;
52
static unsigned char XCMiscCode;
47
#endif
53
#endif
Lines 143-149 Link Here
143
149
144
    REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
150
    REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
145
151
146
    pids = (XID *)ALLOCATE_LOCAL(stuff->count * sizeof(XID));
152
    if (stuff->count > UINT32_MAX / sizeof(XID))
153
	    return BadAlloc;
154
155
    pids = (XID *)Xalloc(stuff->count * sizeof(XID));
147
    if (!pids)
156
    if (!pids)
148
    {
157
    {
149
	return BadAlloc;
158
	return BadAlloc;
Lines 164-170 Link Here
164
    	client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
173
    	client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
165
	WriteSwappedDataToClient(client, count * sizeof(XID), pids);
174
	WriteSwappedDataToClient(client, count * sizeof(XID), pids);
166
    }
175
    }
167
    DEALLOCATE_LOCAL(pids);
176
    Xfree(pids);
168
    return(client->noClientException);
177
    return(client->noClientException);
169
}
178
}
170
179

Return to bug 172575