diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-02-25 17:19:15 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-02-25 17:19:15 +0200 |
commit | ab0cc4e78111167a79bd861cb570ced189303131 (patch) | |
tree | 04751582a0bbdd90997c51c584ed15d9d203f593 /src/bidi.c | |
parent | 3b8b23f66df2c52add54b764a37925818c426581 (diff) | |
download | emacs-ab0cc4e78111167a79bd861cb570ced189303131.tar.gz emacs-ab0cc4e78111167a79bd861cb570ced189303131.tar.bz2 emacs-ab0cc4e78111167a79bd861cb570ced189303131.zip |
Fix infloop in bidi.c
* src/bidi.c (bidi_set_paragraph_end): Reset the isolate_level to
zero. Whenever stack_idx is reset to zero, the isolate_level must
also be reset, since there cannot be any isolate status outside of
embeddings. Failure to reset isolate_level will cause us infloop
when we see a PDI. Reported by Matt Beshara <m@mfa.pw>.
Diffstat (limited to 'src/bidi.c')
-rw-r--r-- | src/bidi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bidi.c b/src/bidi.c index 93875d243e4..3c26ae19322 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -1126,6 +1126,7 @@ bidi_set_paragraph_end (struct bidi_it *bidi_it) bidi_it->invalid_levels = 0; bidi_it->invalid_isolates = 0; bidi_it->stack_idx = 0; + bidi_it->isolate_level = 0; bidi_it->resolved_level = bidi_it->level_stack[0].level; } |