mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-23 10:34:07 +00:00
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)
This commit is contained in:
parent
f2144eef19
commit
01669ad9a6
@ -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 ());
|
||||
|
Loading…
Reference in New Issue
Block a user