From 6ca7c14b581a0067fc5c42ec4eb7a2d7b827ad0f Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Wed, 23 Jul 2025 12:09:19 +0200 Subject: [PATCH] CTM: check for finite value aswell (#11185) checking for < 0.F will not catch NaN or inf values, use std::isfinite aswell. --- src/protocols/CTMControl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/protocols/CTMControl.cpp b/src/protocols/CTMControl.cpp index c9e9d0982..38145ab10 100644 --- a/src/protocols/CTMControl.cpp +++ b/src/protocols/CTMControl.cpp @@ -34,8 +34,8 @@ CHyprlandCTMControlResource::CHyprlandCTMControlResource(UPerror(HYPRLAND_CTM_CONTROL_MANAGER_V1_ERROR_INVALID_MATRIX, "a matrix component was < 0"); + if (!std::isfinite(el) || el < 0.F) { + m_resource->error(HYPRLAND_CTM_CONTROL_MANAGER_V1_ERROR_INVALID_MATRIX, "a matrix component was invalid"); return; } }