From c81a45785970aa198736d8dc578beb2d7bbd1b2f Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 28 Feb 2019 23:11:23 +0100 Subject: Use calloc to zero fill buffers being allocated for replies & events commit cdf5bcd420e5bcf4a4a24a275d3133a4e16ce41e Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 Use calloc to zero fill buffers being allocated for replies & events Ensures padding bytes are zero-filled Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone Attributes ArcticaProject/nx-libs#382 --- nx-X11/programs/Xserver/Xext/sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11/programs/Xserver/Xext/sync.c') diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c index bc7cb404a..00f30e484 100644 --- a/nx-X11/programs/Xserver/Xext/sync.c +++ b/nx-X11/programs/Xserver/Xext/sync.c @@ -590,7 +590,7 @@ SyncSendCounterNotifyEvents(client, ppAwait, num_events) if (client->clientGone) return; pev = pEvents = (xSyncCounterNotifyEvent *) - malloc(num_events * sizeof(xSyncCounterNotifyEvent)); + calloc(num_events, sizeof(xSyncCounterNotifyEvent)); if (!pEvents) return; UpdateCurrentTime(); -- cgit v1.2.3