diff options
| author | Eli Zaretskii | 2022-09-28 16:46:39 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2022-09-28 16:46:39 +0300 |
| commit | b1e92c59ede2e67e36531a35ecb4ccabeaa68ff6 (patch) | |
| tree | db19cf6e40bfa3760e691b11e56f4754b5bbf62c | |
| parent | 72aac80184ce8f8a66bd7558fa935c229a6f13f7 (diff) | |
| download | emacs-b1e92c59ede2e67e36531a35ecb4ccabeaa68ff6.tar.gz emacs-b1e92c59ede2e67e36531a35ecb4ccabeaa68ff6.zip | |
Avoid assertion violations in 'pop_it'
* src/xdisp.c (pop_it): Avoid assertion violations when handling
lists or vectors of display properties. (Bug#58122)
| -rw-r--r-- | src/xdisp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 6d42105474f..f5f3a811e9d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -6755,7 +6755,14 @@ pop_it (struct it *it) | |||
| 6755 | || (STRINGP (it->object) | 6755 | || (STRINGP (it->object) |
| 6756 | && IT_STRING_CHARPOS (*it) == it->bidi_it.charpos | 6756 | && IT_STRING_CHARPOS (*it) == it->bidi_it.charpos |
| 6757 | && IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos) | 6757 | && IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos) |
| 6758 | || (CONSP (it->object) && it->method == GET_FROM_STRETCH)); | 6758 | || (CONSP (it->object) && it->method == GET_FROM_STRETCH) |
| 6759 | /* We could be in the middle of handling a list or a | ||
| 6760 | vector of several 'display' properties, in which | ||
| 6761 | case we should only verify the above conditions when | ||
| 6762 | we pop the iterator stack the last time, because | ||
| 6763 | higher stack levels cannot "iterate out of the | ||
| 6764 | display property". */ | ||
| 6765 | || it->sp > 0); | ||
| 6759 | } | 6766 | } |
| 6760 | /* If we move the iterator over text covered by a display property | 6767 | /* If we move the iterator over text covered by a display property |
| 6761 | to a new buffer position, any info about previously seen overlays | 6768 | to a new buffer position, any info about previously seen overlays |