diff options
| author | Eli Zaretskii | 2017-04-21 11:10:14 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-04-21 11:10:14 +0300 |
| commit | 72d7961d678f9c5f4cb812e0bb9b6dffafb47c68 (patch) | |
| tree | 808a9052bbc214fabb5a4f3928ee6d2353f66d52 | |
| parent | b1fe497a445a8be1b50c5b5952f3380ee9546710 (diff) | |
| download | emacs-72d7961d678f9c5f4cb812e0bb9b6dffafb47c68.tar.gz emacs-72d7961d678f9c5f4cb812e0bb9b6dffafb47c68.zip | |
Avoid infinite loop in redisplay when header-line-format is invalid
* src/xdisp.c (handle_invisible_prop): Avoid inflooping when the
string has an invalid %-construct in it and is displayed as part
of mode-line or header-line. (Bug#26586)
| -rw-r--r-- | src/xdisp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 58b5ca2f018..3e6a3078cea 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -4318,7 +4318,8 @@ handle_invisible_prop (struct it *it) | |||
| 4318 | bidi_move_to_visually_next (&it->bidi_it); | 4318 | bidi_move_to_visually_next (&it->bidi_it); |
| 4319 | } | 4319 | } |
| 4320 | while (oldpos <= it->bidi_it.charpos | 4320 | while (oldpos <= it->bidi_it.charpos |
| 4321 | && it->bidi_it.charpos < endpos); | 4321 | && it->bidi_it.charpos < endpos |
| 4322 | && it->bidi_it.charpos < it->bidi_it.string.schars); | ||
| 4322 | 4323 | ||
| 4323 | IT_STRING_CHARPOS (*it) = it->bidi_it.charpos; | 4324 | IT_STRING_CHARPOS (*it) = it->bidi_it.charpos; |
| 4324 | IT_STRING_BYTEPOS (*it) = it->bidi_it.bytepos; | 4325 | IT_STRING_BYTEPOS (*it) = it->bidi_it.bytepos; |