From: Eli Zaretskii Date: Sat, 12 Jul 2014 10:29:13 +0000 (+0300) Subject: Attempt to fix bug #17962 with SIGSEGV in display_line. X-Git-Tag: emacs-24.3.93~71 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dc47c639f9ba35c80f8d82e5449319df4d395a22;p=emacs.git Attempt to fix bug #17962 with SIGSEGV in display_line. src/xdisp.c (display_line): Don't call FETCH_BYTE with argument less than 1. --- diff --git a/src/ChangeLog b/src/ChangeLog index 493bcde7418..9051d37fcef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2014-07-12 Eli Zaretskii + * xdisp.c (display_line): Don't call FETCH_BYTE with argument less + than 1. (Bug#17962) + * w32fns.c (Fx_file_dialog): Mention in the doc string the behavior on Windows 7 and later when the function is repeatedly invoked with the same value of DIR. (Bug#17950) diff --git a/src/xdisp.c b/src/xdisp.c index 61d1fa24c68..6918c4360d4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -20512,7 +20512,10 @@ display_line (struct it *it) row->truncated_on_right_p = 1; it->continuation_lines_width = 0; reseat_at_next_visible_line_start (it, 0); - row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n'; + if (IT_BYTEPOS (*it) <= BEG_BYTE) + row->ends_at_zv_p = true; + else + row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n'; break; } }