Commit aac1f8dd authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

* xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction): Avoid

undefined behavior by initializing display property bit of a
string processed by the bidirectional iterator.  For details, see
<http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
parent 0db19d38
2014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
* xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction): Avoid
undefined behavior by initializing display property bit of a
string processed by the bidirectional iterator. For details, see
<http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
2014-01-23 Paul Eggert <eggert@cs.ucla.edu> 2014-01-23 Paul Eggert <eggert@cs.ucla.edu>
Minor cleanup of previous change. Minor cleanup of previous change.
......
...@@ -6409,6 +6409,7 @@ reseat_1 (struct it *it, struct text_pos pos, int set_stop_p) ...@@ -6409,6 +6409,7 @@ reseat_1 (struct it *it, struct text_pos pos, int set_stop_p)
it->bidi_it.string.s = NULL; it->bidi_it.string.s = NULL;
it->bidi_it.string.lstring = Qnil; it->bidi_it.string.lstring = Qnil;
it->bidi_it.string.bufpos = 0; it->bidi_it.string.bufpos = 0;
it->bidi_it.string.from_disp_str = 0;
it->bidi_it.string.unibyte = 0; it->bidi_it.string.unibyte = 0;
it->bidi_it.w = it->w; it->bidi_it.w = it->w;
} }
...@@ -20411,6 +20412,7 @@ See also `bidi-paragraph-direction'. */) ...@@ -20411,6 +20412,7 @@ See also `bidi-paragraph-direction'. */)
itb.string.s = NULL; itb.string.s = NULL;
itb.string.lstring = Qnil; itb.string.lstring = Qnil;
itb.string.bufpos = 0; itb.string.bufpos = 0;
itb.string.from_disp_str = 0;
itb.string.unibyte = 0; itb.string.unibyte = 0;
/* We have no window to use here for ignoring window-specific /* We have no window to use here for ignoring window-specific
overlays. Using NULL for window pointer will cause overlays. Using NULL for window pointer will cause
......
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