From af3a61a4e437fe728ef69c2739cae79e5a6254c0 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Tue, 2 Apr 2024 01:15:58 +0100 Subject: [PATCH] core: assert attempted UAFs in windowExists in prep of removing the thing altogether --- src/Compositor.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 3ac9a73f..5fefb2b8 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -704,6 +704,11 @@ bool CCompositor::windowExists(CWindow* pWindow) { return true; } + // FIXME: this is here only temporarily, + // remove this func altogether if no reports + // of this being hit. + RASSERT(!pWindow, "windowExists: attempted UAF"); + return false; } @@ -1388,7 +1393,7 @@ bool CCompositor::isWindowActive(CWindow* pWindow) { if (!m_pLastWindow && !m_pLastFocus) return false; - if (!windowValidMapped(pWindow)) + if (!pWindow->m_bIsMapped) return false; const auto PSURFACE = pWindow->m_pWLSurface.wlr();