xserver: Branch 'master'
Adam Jackson
ajax at kemper.freedesktop.org
Fri Feb 23 17:14:09 UTC 2018
composite/compwindow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit efd84bff238f8e12bf652525990d36baada8785b
Author: Peter Harris <pharris at opentext.com>
Date: Thu Feb 22 18:07:38 2018 -0500
composite: Fix use-after-free in compReparentWindow
If an implicitly redirected window is unredirected by the reparent
operation, cw will be a stale pointer.
Signed-off-by: Peter Harris <pharris at opentext.com>
Reviewed-by: Keith Packard <keithp at keithp.com>
diff --git a/composite/compwindow.c b/composite/compwindow.c
index e74ce661a..54b4e6ac4 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -432,7 +432,7 @@ compReparentWindow(WindowPtr pWin, WindowPtr pPriorParent)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
CompScreenPtr cs = GetCompScreen(pScreen);
- CompWindowPtr cw = GetCompWindow(pWin);
+ CompWindowPtr cw;
pScreen->ReparentWindow = cs->ReparentWindow;
/*
@@ -471,6 +471,7 @@ compReparentWindow(WindowPtr pWin, WindowPtr pPriorParent)
cs->ReparentWindow = pScreen->ReparentWindow;
pScreen->ReparentWindow = compReparentWindow;
+ cw = GetCompWindow(pWin);
if (pWin->damagedDescendants || (cw && cw->damaged))
compMarkAncestors(pWin);
More information about the xorg-commit
mailing list