diff options
| author | Eli Zaretskii | 2014-07-12 13:29:13 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-07-12 13:29:13 +0300 |
| commit | dc47c639f9ba35c80f8d82e5449319df4d395a22 (patch) | |
| tree | e334ffe9dece9253899ad0314a4c9c32c5c14e38 /src | |
| parent | 47f63aa79abed1da90fabd637529d5f8161f84fa (diff) | |
| download | emacs-dc47c639f9ba35c80f8d82e5449319df4d395a22.tar.gz emacs-dc47c639f9ba35c80f8d82e5449319df4d395a22.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/xdisp.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 493bcde7418..9051d37fcef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2014-07-12 Eli Zaretskii <eliz@gnu.org> | 1 | 2014-07-12 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (display_line): Don't call FETCH_BYTE with argument less | ||
| 4 | than 1. (Bug#17962) | ||
| 5 | |||
| 3 | * w32fns.c (Fx_file_dialog): Mention in the doc string the | 6 | * w32fns.c (Fx_file_dialog): Mention in the doc string the |
| 4 | behavior on Windows 7 and later when the function is repeatedly | 7 | behavior on Windows 7 and later when the function is repeatedly |
| 5 | invoked with the same value of DIR. (Bug#17950) | 8 | 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) | |||
| 20512 | row->truncated_on_right_p = 1; | 20512 | row->truncated_on_right_p = 1; |
| 20513 | it->continuation_lines_width = 0; | 20513 | it->continuation_lines_width = 0; |
| 20514 | reseat_at_next_visible_line_start (it, 0); | 20514 | reseat_at_next_visible_line_start (it, 0); |
| 20515 | row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n'; | 20515 | if (IT_BYTEPOS (*it) <= BEG_BYTE) |
| 20516 | row->ends_at_zv_p = true; | ||
| 20517 | else | ||
| 20518 | row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n'; | ||
| 20516 | break; | 20519 | break; |
| 20517 | } | 20520 | } |
| 20518 | } | 20521 | } |