[vte] ring: Proper boundary checking for hyperlink position
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] ring: Proper boundary checking for hyperlink position
- Date: Sun, 13 May 2018 13:30:23 +0000 (UTC)
commit d7df8276158dd448cf6813fb1039e7b5c464a1c2
Author: Egmont Koblinger <egmont gmail com>
Date: Sun May 13 15:27:17 2018 +0200
ring: Proper boundary checking for hyperlink position
This fixes a rare crash around hyperlinks in a non grid aligned
VTE widget when the mouse enters the extra padding at the bottom.
https://bugzilla.gnome.org/show_bug.cgi?id=795826
src/ring.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/ring.cc b/src/ring.cc
index dd25224..fc78ce5 100644
--- a/src/ring.cc
+++ b/src/ring.cc
@@ -634,7 +634,7 @@ Ring::get_hyperlink_at_position(row_t position,
m_cached_row_num = (row_t)-1;
}
- if (G_UNLIKELY (position == (row_t)-1 || col == -1)) {
+ if (G_UNLIKELY (!contains(position) || col < 0)) {
if (update_hover_idx)
m_hyperlink_hover_idx = 0;
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]