diff options
Diffstat (limited to 'nx-X11/programs/Xserver/xfixes')
-rw-r--r-- | nx-X11/programs/Xserver/xfixes/cursor.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/xfixes/region.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/xfixes/cursor.c b/nx-X11/programs/Xserver/xfixes/cursor.c index 152bda500..b80bd90d6 100644 --- a/nx-X11/programs/Xserver/xfixes/cursor.c +++ b/nx-X11/programs/Xserver/xfixes/cursor.c @@ -364,8 +364,8 @@ ProcXFixesGetCursorImage (ClientPtr client) width = pCursor->bits->width; height = pCursor->bits->height; npixels = width * height; - rep = malloc (sizeof (xXFixesGetCursorImageReply) + - npixels * sizeof (CARD32)); + rep = calloc (sizeof (xXFixesGetCursorImageReply) + + npixels * sizeof (CARD32), 1); if (!rep) return BadAlloc; @@ -508,8 +508,8 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) name = pCursor->name ? NameForAtom (pCursor->name) : ""; nbytes = strlen (name); nbytesRound = (nbytes + 3) & ~3; - rep = malloc (sizeof (xXFixesGetCursorImageAndNameReply) + - npixels * sizeof (CARD32) + nbytesRound); + rep = calloc (sizeof (xXFixesGetCursorImageAndNameReply) + + npixels * sizeof (CARD32) + nbytesRound, 1); if (!rep) return BadAlloc; diff --git a/nx-X11/programs/Xserver/xfixes/region.c b/nx-X11/programs/Xserver/xfixes/region.c index ba8c62835..849df6869 100644 --- a/nx-X11/programs/Xserver/xfixes/region.c +++ b/nx-X11/programs/Xserver/xfixes/region.c @@ -570,8 +570,8 @@ ProcXFixesFetchRegion (ClientPtr client) pBox = RegionRects (pRegion); nBox = RegionNumRects (pRegion); - reply = malloc (sizeof (xXFixesFetchRegionReply) + - nBox * sizeof (xRectangle)); + reply = calloc (sizeof (xXFixesFetchRegionReply) + + nBox * sizeof (xRectangle), 1); if (!reply) return BadAlloc; reply->type = X_Reply; |