aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
diff options
context:
space:
mode:
authorPeter Åstrand <astrand@cendio.se>2009-02-13 10:23:28 +0100
committerUlrich Sibiller <uli42@gmx.de>2015-07-02 00:24:11 +0200
commitd088698324d5e71cb93ccd429f084729ba07872c (patch)
tree770207f94a7e65c6fc1e48f659ebc77a2f0f8cae /nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
parentcf660f485eb478bcb7aaef3a538f2791e46662d9 (diff)
downloadnx-libs-d088698324d5e71cb93ccd429f084729ba07872c.tar.gz
nx-libs-d088698324d5e71cb93ccd429f084729ba07872c.tar.bz2
nx-libs-d088698324d5e71cb93ccd429f084729ba07872c.zip
Backport: xserver: Avoid sending uninitialized padding data over the network
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXwindow.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXwindow.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
index 76e86fd2a..bb28961d1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
@@ -960,6 +960,7 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
if (SubSend(pParent))
{
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = CreateNotify;
event.u.createNotify.window = wid;
event.u.createNotify.parent = pParent->drawable.id;
@@ -1027,6 +1028,7 @@ CrushTree(WindowPtr pWin)
pParent = pChild->parent;
if (SubStrSend(pChild, pParent))
{
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = DestroyNotify;
event.u.destroyNotify.window = pChild->drawable.id;
DeliverEvents(pChild, &event, 1, NullWindow);
@@ -1076,6 +1078,7 @@ DeleteWindow(pointer value, XID wid)
pParent = pWin->parent;
if (wid && pParent && SubStrSend(pWin, pParent))
{
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = DestroyNotify;
event.u.destroyNotify.window = pWin->drawable.id;
DeliverEvents(pWin, &event, 1, NullWindow);
@@ -2562,6 +2565,7 @@ ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientP
#endif
))
{
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = ConfigureRequest;
event.u.configureRequest.window = pWin->drawable.id;
if (mask & CWSibling)
@@ -2606,6 +2610,7 @@ ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientP
if (size_change && ((pWin->eventMask|wOtherEventMasks(pWin)) & ResizeRedirectMask))
{
xEvent eventT;
+ memset(&eventT, 0, sizeof(xEvent));
eventT.u.u.type = ResizeRequest;
eventT.u.resizeRequest.window = pWin->drawable.id;
eventT.u.resizeRequest.width = w;
@@ -2652,6 +2657,7 @@ ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientP
ActuallyDoSomething:
if (SubStrSend(pWin, pParent))
{
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = ConfigureNotify;
event.u.configureNotify.window = pWin->drawable.id;
if (pSib)
@@ -2825,6 +2831,7 @@ ReparentWindow(register WindowPtr pWin, register WindowPtr pParent,
if (WasMapped)
UnmapWindow(pWin, FALSE);
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = ReparentNotify;
event.u.reparent.window = pWin->drawable.id;
event.u.reparent.parent = pParent->drawable.id;
@@ -2996,6 +3003,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
#endif
))
{
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = MapRequest;
event.u.mapRequest.window = pWin->drawable.id;
#ifdef XAPPGROUP
@@ -3018,6 +3026,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
pWin->mapped = TRUE;
if (SubStrSend(pWin, pParent))
{
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = MapNotify;
event.u.mapNotify.window = pWin->drawable.id;
event.u.mapNotify.override = pWin->overrideRedirect;
@@ -3110,6 +3119,7 @@ MapSubwindows(register WindowPtr pParent, ClientPtr client)
{
if (parentRedirect && !pWin->overrideRedirect)
{
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = MapRequest;
event.u.mapRequest.window = pWin->drawable.id;
event.u.mapRequest.parent = pParent->drawable.id;
@@ -3122,6 +3132,7 @@ MapSubwindows(register WindowPtr pParent, ClientPtr client)
pWin->mapped = TRUE;
if (parentNotify || StrSend(pWin))
{
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = MapNotify;
event.u.mapNotify.window = pWin->drawable.id;
event.u.mapNotify.override = pWin->overrideRedirect;
@@ -3283,6 +3294,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
return(Success);
if (SubStrSend(pWin, pParent))
{
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = UnmapNotify;
event.u.unmapNotify.window = pWin->drawable.id;
event.u.unmapNotify.fromConfigure = fromConfigure;
@@ -3577,6 +3589,7 @@ SendVisibilityNotify(WindowPtr pWin)
}
#endif
+ memset(&event, 0, sizeof(xEvent));
event.u.u.type = VisibilityNotify;
event.u.visibility.window = pWin->drawable.id;
event.u.visibility.state = visibility;