From 31963f823b12d79727c98ab51bd64f96cc0433e0 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 8 Apr 2023 13:35:36 +0100 Subject: [PATCH] screencopy: fix crash in invalid format reads --- src/protocols/Screencopy.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp index 07422023..a697abc9 100644 --- a/src/protocols/Screencopy.cpp +++ b/src/protocols/Screencopy.cpp @@ -379,6 +379,7 @@ bool CScreencopyProtocolManager::copyFrameShm(SScreencopyFrame* frame, timespec* const auto PFORMAT = get_gles2_format_from_drm(format); if (!PFORMAT) { Debug::log(ERR, "[screencopy] Cannot read pixels, unsupported format %x", PFORMAT); + wlr_output_rollback(PMONITOR->output); pixman_region32_fini(&fakeDamage); wlr_buffer_end_data_ptr_access(frame->buffer); return false;