From 390d3e9fbec6660c108805b282455fafc5a66606 Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 8 Jul 2021 20:11:55 +0200 Subject: [PATCH] LibVT: Ignore DECSTBM with invalid values (#8559) Co-authored-by: pancake --- Userland/Libraries/LibVT/Terminal.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibVT/Terminal.cpp b/Userland/Libraries/LibVT/Terminal.cpp index e21635f8d9..ce1d054c9a 100644 --- a/Userland/Libraries/LibVT/Terminal.cpp +++ b/Userland/Libraries/LibVT/Terminal.cpp @@ -396,6 +396,9 @@ void Terminal::DECSTBM(Parameters params) dbgln("Error: DECSTBM: scrolling region invalid: {}-{}", top, bottom); return; } + if (top >= bottom) { + return; + } m_scroll_region_top = top - 1; m_scroll_region_bottom = bottom - 1; set_cursor(0, 0);