Backport fix for crash due to out of bounds cursor (#1756567)
This commit is contained in:
parent
b067afd77f
commit
09b6f35fe9
@ -0,0 +1,35 @@
|
||||
From ef0734c1eb775cf98db9a6e8e87700830b1a3890 Mon Sep 17 00:00:00 2001
|
||||
From: Egmont Koblinger <egmont@gmail.com>
|
||||
Date: Tue, 24 Sep 2019 13:01:54 +0200
|
||||
Subject: [PATCH] emulation: Ensure the cursor remains onscreen when moving
|
||||
down
|
||||
|
||||
Previously the cursor could escape from the onscreen area, resulting in
|
||||
a crash. This happened when a scrolling area was defined which did not
|
||||
include the bottom row, the cursor was in the terminal's bottom row and
|
||||
moved downwards from there.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/vte/issues/176
|
||||
---
|
||||
src/vte.cc | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/vte.cc b/src/vte.cc
|
||||
index 1f926511..45d480c8 100644
|
||||
--- a/src/vte.cc
|
||||
+++ b/src/vte.cc
|
||||
@@ -2706,8 +2706,9 @@ Terminal::cursor_down(bool explicit_sequence)
|
||||
VteRowData *rowdata = ensure_row();
|
||||
_vte_row_data_fill (rowdata, &m_color_defaults, m_column_count);
|
||||
}
|
||||
- } else {
|
||||
- /* Otherwise, just move the cursor down. */
|
||||
+ } else if (m_screen->cursor.row < m_screen->insert_delta + m_row_count - 1) {
|
||||
+ /* Otherwise, just move the cursor down; unless it's already in the last
|
||||
+ * physical row (which is possible with scrolling region, see #176). */
|
||||
m_screen->cursor.row++;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
||||
10
vte291.spec
10
vte291.spec
@ -9,7 +9,7 @@
|
||||
|
||||
Name: vte291
|
||||
Version: 0.58.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Terminal emulator library
|
||||
|
||||
License: LGPLv2+
|
||||
@ -19,6 +19,10 @@ Source0: http://download.gnome.org/sources/vte/0.58/vte-%{version}.tar.xz
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=711059
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1103380
|
||||
Patch100: vte291-cntnr-precmd-preexec-scroll.patch
|
||||
# Backport fix for crash due to out of bounds cursor position
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1756567
|
||||
# https://gitlab.gnome.org/GNOME/vte/issues/176
|
||||
Patch101: 0001-emulation-Ensure-the-cursor-remains-onscreen-when-mo.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gettext
|
||||
@ -76,6 +80,7 @@ emulator library.
|
||||
%prep
|
||||
%setup -q -n vte-%{version}
|
||||
%patch100 -p1 -b .cntnr-precmd-preexec-scroll
|
||||
%patch101 -p1 -b .cursor-crash
|
||||
|
||||
%build
|
||||
%meson --buildtype=plain -Ddocs=true
|
||||
@ -105,6 +110,9 @@ emulator library.
|
||||
%{_sysconfdir}/profile.d/vte.sh
|
||||
|
||||
%changelog
|
||||
* Fri Oct 04 2019 Adam Williamson <awilliam@redhat.com> - 0.58.0-2
|
||||
- Backport fix for crash due to out of bounds cursor position (#1756567)
|
||||
|
||||
* Mon Sep 09 2019 Kalev Lember <klember@redhat.com> - 0.58.0-1
|
||||
- Update to 0.58.0
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user