emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-25 01669ad: Avoid crashes when setting the cursor


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 01669ad: Avoid crashes when setting the cursor
Date: Tue, 4 Oct 2016 19:13:12 +0000 (UTC)

branch: emacs-25
commit 01669ad9a67af27101decc387e44407e0a08bcf2
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Avoid crashes when setting the cursor
    
    * src/xdisp.c (display_and_set_cursor): Don't index glyphs of a
    glyph row if hpos is out of valid bounds.  This avoids crashes in
    some rare cases.  (Bug#24614)
---
 src/xdisp.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index adbb6e5..42c6fb7 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -28486,8 +28486,7 @@ display_and_set_cursor (struct window *w, bool on,
     }
 
   glyph = NULL;
-  if (!glyph_row->exact_window_width_line_p
-      || (0 <= hpos && hpos < glyph_row->used[TEXT_AREA]))
+  if (0 <= hpos && hpos < glyph_row->used[TEXT_AREA])
     glyph = glyph_row->glyphs[TEXT_AREA] + hpos;
 
   eassert (input_blocked_p ());



reply via email to

[Prev in Thread] Current Thread [Next in Thread]