emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105491: Protect the bidi iterator ag


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105491: Protect the bidi iterator against zero bidi properties.
Date: Thu, 18 Aug 2011 21:46:02 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105491
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Thu 2011-08-18 21:46:02 +0300
message:
  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'.
modified:
  src/ChangeLog
  src/bidi.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-08-18 16:09:40 +0000
+++ b/src/ChangeLog     2011-08-18 18:46:02 +0000
@@ -1,5 +1,9 @@
 2011-08-18  Eli Zaretskii  <address@hidden>
 
+       * 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

=== modified file 'src/bidi.c'
--- a/src/bidi.c        2011-08-15 18:54:18 +0000
+++ b/src/bidi.c        2011-08-18 18:46:02 +0000
@@ -108,6 +108,8 @@
     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;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]