aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXshm.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-03 11:04:10 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-03 11:04:10 +0100
commit20029dbc8f7d03211ceaf00001418fb75b9df644 (patch)
treee8950e052bb5ee4328a052a9cf04efc847c47eff /nx-X11/programs/Xserver/hw/nxagent/NXshm.c
parent9d41e84ea9baf215c6de11224dc2597cd37359dc (diff)
parent3e315cd17a519dbcafff18d4294a6f7bb8070767 (diff)
downloadnx-libs-20029dbc8f7d03211ceaf00001418fb75b9df644.tar.gz
nx-libs-20029dbc8f7d03211ceaf00001418fb75b9df644.tar.bz2
nx-libs-20029dbc8f7d03211ceaf00001418fb75b9df644.zip
Merge branch 'uli42-pr/happyvalgrind' into 3.6.x
Fixes ArcticaProject/nx-libs#325. Fixes ArcticaProject/nx-libs#326. Attribute GH PR #360: https://github.com/ArcticaProject/nx-libs/pull/360
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXshm.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXshm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c
index fa60917e3..f251f3b9f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c
@@ -240,7 +240,7 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
length = nxagentImageLength(sw, sh, format, 0, depth);
- if ((newdata = malloc(length)) != NULL)
+ if ((newdata = calloc(1, length)) != NULL)
{
fbGetImage((DrawablePtr) pPixmap, sx, sy, sw, sh, format, AllPlanes, newdata);
(*pGC->ops->PutImage)(dst, pGC, depth, dx, dy, sw, sh, 0, format, newdata);
@@ -360,6 +360,7 @@ ProcShmPutImage(client)
{
xShmCompletionEvent ev;
+ memset(&ev, 0, sizeof(xShmCompletionEvent));
ev.type = ShmCompletionCode;
ev.drawable = stuff->drawable;
ev.sequenceNumber = client->sequence;