diff options
author | marha <marha@users.sourceforge.net> | 2015-05-26 19:43:34 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-05-26 19:43:34 +0200 |
commit | 912e881bec8b16f2331225960645c3bdf5a8ba2d (patch) | |
tree | 92afd568d4b3eaab1faf26d8d95d8c6df0173079 /xorg-server/render | |
parent | 2e00f3764228cfc91180bbe9375a8d85e0e65a5b (diff) | |
parent | 843964ee791452b197e41dacb0146f5b456ffaa5 (diff) | |
download | vcxsrv-912e881bec8b16f2331225960645c3bdf5a8ba2d.tar.gz vcxsrv-912e881bec8b16f2331225960645c3bdf5a8ba2d.tar.bz2 vcxsrv-912e881bec8b16f2331225960645c3bdf5a8ba2d.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mapi/glapi/glapi_priv.h
mesalib/src/mesa/drivers/dri/swrast/swrast.c
xorg-server/dix/dispatch.c
xorg-server/os/utils.c
xorg-server/record/record.c
Diffstat (limited to 'xorg-server/render')
-rw-r--r-- | xorg-server/render/filter.c | 12 | ||||
-rw-r--r-- | xorg-server/render/miindex.c | 2 | ||||
-rw-r--r-- | xorg-server/render/mipict.c | 4 | ||||
-rw-r--r-- | xorg-server/render/picture.c | 2 | ||||
-rwxr-xr-x | xorg-server/render/render.c | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/xorg-server/render/filter.c b/xorg-server/render/filter.c index 019ea7f94..2741f406c 100644 --- a/xorg-server/render/filter.c +++ b/xorg-server/render/filter.c @@ -67,7 +67,7 @@ PictureGetFilterId(const char *filter, int len, Bool makeit) memcpy(name, filter, len); name[len] = '\0'; if (filterNames) - names = realloc(filterNames, (nfilterNames + 1) * sizeof(char *)); + names = reallocarray(filterNames, nfilterNames + 1, sizeof(char *)); else names = malloc(sizeof(char *)); if (!names) { @@ -145,7 +145,7 @@ PictureAddFilter(ScreenPtr pScreen, return -1; if (ps->filters) filters = - realloc(ps->filters, (ps->nfilters + 1) * sizeof(PictFilterRec)); + reallocarray(ps->filters, ps->nfilters + 1, sizeof(PictFilterRec)); else filters = malloc(sizeof(PictFilterRec)); if (!filters) @@ -177,9 +177,9 @@ PictureSetFilterAlias(ScreenPtr pScreen, const char *filter, const char *alias) PictFilterAliasPtr aliases; if (ps->filterAliases) - aliases = realloc(ps->filterAliases, - (ps->nfilterAliases + 1) * - sizeof(PictFilterAliasRec)); + aliases = reallocarray(ps->filterAliases, + ps->nfilterAliases + 1, + sizeof(PictFilterAliasRec)); else aliases = malloc(sizeof(PictFilterAliasRec)); if (!aliases) @@ -336,7 +336,7 @@ SetPicturePictFilter(PicturePtr pPicture, PictFilterPtr pFilter, return BadMatch; if (nparams != pPicture->filter_nparams) { - xFixed *new_params = malloc(nparams * sizeof(xFixed)); + xFixed *new_params = xallocarray(nparams, sizeof(xFixed)); if (!new_params && nparams) return BadAlloc; diff --git a/xorg-server/render/miindex.c b/xorg-server/render/miindex.c index 0375e8f88..4119eef66 100644 --- a/xorg-server/render/miindex.c +++ b/xorg-server/render/miindex.c @@ -254,7 +254,7 @@ miInitIndexed(ScreenPtr pScreen, PictFormatPtr pFormat) return FALSE; pFormat->index.nvalues = num; - pFormat->index.pValues = malloc(num * sizeof(xIndexValue)); + pFormat->index.pValues = xallocarray(num, sizeof(xIndexValue)); if (!pFormat->index.pValues) { free(pIndexed); return FALSE; diff --git a/xorg-server/render/mipict.c b/xorg-server/render/mipict.c index 62d18cd04..e83fb3566 100644 --- a/xorg-server/render/mipict.c +++ b/xorg-server/render/mipict.c @@ -510,7 +510,7 @@ miTriStrip(CARD8 op, int ntri; ntri = npoints - 2; - tris = malloc(ntri * sizeof(xTriangle)); + tris = xallocarray(ntri, sizeof(xTriangle)); if (!tris) return; @@ -535,7 +535,7 @@ miTriFan(CARD8 op, int ntri; ntri = npoints - 2; - tris = malloc(ntri * sizeof(xTriangle)); + tris = xallocarray(ntri, sizeof(xTriangle)); if (!tris) return; diff --git a/xorg-server/render/picture.c b/xorg-server/render/picture.c index 6ff31ba02..60517a4ee 100644 --- a/xorg-server/render/picture.c +++ b/xorg-server/render/picture.c @@ -837,7 +837,7 @@ initGradient(SourcePictPtr pGradient, int stopCount, dpos = stopPoints[i]; } - pGradient->gradient.stops = malloc(stopCount * sizeof(PictGradientStop)); + pGradient->gradient.stops = xallocarray(stopCount, sizeof(PictGradientStop)); if (!pGradient->gradient.stops) { *error = BadAlloc; return; diff --git a/xorg-server/render/render.c b/xorg-server/render/render.c index 68e79aa39..e6e6177bc 100755 --- a/xorg-server/render/render.c +++ b/xorg-server/render/render.c @@ -1318,14 +1318,14 @@ ProcRenderCompositeGlyphs(ClientPtr client) if (nglyph <= NLOCALGLYPH) glyphsBase = glyphsLocal; else { - glyphsBase = (GlyphPtr *) malloc(nglyph * sizeof(GlyphPtr)); + glyphsBase = xallocarray(nglyph, sizeof(GlyphPtr)); if (!glyphsBase) return BadAlloc; } if (nlist <= NLOCALDELTA) listsBase = listsLocal; else { - listsBase = (GlyphListPtr) malloc(nlist * sizeof(GlyphListRec)); + listsBase = xallocarray(nlist, sizeof(GlyphListRec)); if (!listsBase) { rc = BadAlloc; goto bail; @@ -1793,7 +1793,7 @@ ProcRenderCreateAnimCursor(ClientPtr client) ncursor = (client->req_len - (bytes_to_int32(sizeof(xRenderCreateAnimCursorReq)))) >> 1; - cursors = malloc(ncursor * (sizeof(CursorPtr) + sizeof(CARD32))); + cursors = xallocarray(ncursor, sizeof(CursorPtr) + sizeof(CARD32)); if (!cursors) return BadAlloc; deltas = (CARD32 *) (cursors + ncursor); |