1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00

* 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>.
This commit is contained in:
Dmitry Antipov 2014-01-24 07:53:16 +04:00
parent 0db19d3890
commit aac1f8ddd5
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,10 @@
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.

View File

@ -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'. */)
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