# HG changeset patch # User Kim F. Storm # Date 1110187761 0 # Node ID 9fb42eb030941c38c91295dd81205af31dbadadd # Parent 02e499afb3054eedb00dad0b01b422aab06e1bb5 (notice_overwritten_cursor): Check that phys_cursor.vpos is valid. If not, clear phys_cursor_on_p and return. diff -r 02e499afb305 -r 9fb42eb03094 src/xdisp.c --- a/src/xdisp.c Mon Mar 07 09:29:05 2005 +0000 +++ b/src/xdisp.c Mon Mar 07 09:29:21 2005 +0000 @@ -20201,9 +20201,14 @@ if (area != TEXT_AREA) return; - row = w->current_matrix->rows + w->phys_cursor.vpos; - if (!row->displays_text_p) - return; + if (w->phys_cursor.vpos < 0 + || w->phys_cursor.vpos >= w->current_matrix->nrows + || (row = w->current_matrix->rows + w->phys_cursor.vpos, + !(row->enabled_p && row->displays_text_p))) + { + w->phys_cursor_on_p = 0; + return; + } if (row->cursor_in_fringe_p) {