diff options
author | Eli Zaretskii <eliz@gnu.org> | 2016-10-04 22:12:08 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2016-10-04 22:12:08 +0300 |
commit | 01669ad9a67af27101decc387e44407e0a08bcf2 (patch) | |
tree | fa36c05ab7ced7ec905b8ffe2d9cafb9c180d8c8 /src | |
parent | f2144eef19611fb2189c44c055e1d539b7a53f08 (diff) | |
download | emacs-01669ad9a67af27101decc387e44407e0a08bcf2.tar.gz |
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/xdisp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index adbb6e5088b..42c6fb75efa 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 ()); |