[vte/vte-0-52] ring: Proper boundary checking for hyperlink position



commit 5966e8bfbaa99dc778367e8433efeca6d50ebcf9
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
    (cherry picked from commit d7df8276158dd448cf6813fb1039e7b5c464a1c2)

 src/ring.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/ring.cc b/src/ring.cc
index 05e938e..2dc5a52 100644
--- a/src/ring.cc
+++ b/src/ring.cc
@@ -669,7 +669,7 @@ _vte_ring_get_hyperlink_at_position (VteRing *ring, gulong position, int col, bo
                 ring->cached_row_num = (gulong) -1;
         }
 
-        if (G_UNLIKELY (position == (gulong) -1 || col == -1)) {
+        if (G_UNLIKELY (!_vte_ring_contains(ring, position) || col == -1)) {
                 if (update_hover_idx)
                         ring->hyperlink_hover_idx = 0;
                 return 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]