diff options
author | Peter Åstrand <astrand@cendio.se> | 2009-02-13 10:23:28 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-02-16 13:28:38 +1000 |
commit | ddb8d8945d1f44d16adc366b6612eef20ae813f7 (patch) | |
tree | d40a0cf5909a20f399827005336f49a2e84ed7ba /mi/miexpose.c | |
parent | b735a4b4951b607e614682836f24d5fd86c1f7fb (diff) |
xserver: Avoid sending uninitialized padding data over the network
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'mi/miexpose.c')
-rw-r--r-- | mi/miexpose.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mi/miexpose.c b/mi/miexpose.c index 082f90677..5746a5fca 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -381,6 +381,7 @@ miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, else { xEvent event; + memset(&event, 0, sizeof(xEvent)); event.u.u.type = NoExpose; event.u.noExposure.drawable = drawable; event.u.noExposure.majorEvent = major; @@ -401,7 +402,7 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) pBox = REGION_RECTS(pRgn); numRects = REGION_NUM_RECTS(pRgn); - if(!(pEvent = xalloc(numRects * sizeof(xEvent)))) + if(!(pEvent = xcalloc(1, numRects * sizeof(xEvent)))) return; for (i=numRects, pe = pEvent; --i >= 0; pe++, pBox++) |