Commit 0be6ee06 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Protect the bidi iterator against zero bidi properties.

 src/bidi.c (bidi_get_type): If bidi_type_table reports zero as the
 character bidirectional type, use STRONG_L instead.  Fixes crashes
 in a buffer produced by `describe-categories'.
parent 92b71444
2011-08-18 Eli Zaretskii <eliz@gnu.org>
* bidi.c (bidi_get_type): If bidi_type_table reports zero as the
character bidirectional type, use STRONG_L instead. Fixes crashes
in a buffer produced by `describe-categories'.
* dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
members before the level stack, so they would be saved and
restored when copying iterator state. Fixes incorrect reordering
......
......@@ -108,6 +108,8 @@ bidi_get_type (int ch, bidi_dir_t override)
abort ();
default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch));
if (default_type == 0)
default_type = STRONG_L;
if (override == NEUTRAL_DIR)
return default_type;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment