diff options
| author | Dmitry Antipov | 2014-01-24 07:53:16 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2014-01-24 07:53:16 +0400 |
| commit | aac1f8ddd525c8a02bb9b653bdccf24a179d8db5 (patch) | |
| tree | 3444c4d3cb47ba2e017adc2843b30850f36436bf | |
| parent | 0db19d389097542c3db977e918ff219dabcecc43 (diff) | |
| download | emacs-aac1f8ddd525c8a02bb9b653bdccf24a179d8db5.tar.gz emacs-aac1f8ddd525c8a02bb9b653bdccf24a179d8db5.zip | |
* 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>.
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d0d72dd6016..6dbaa5cbcf2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-01-24 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction): Avoid | ||
| 4 | undefined behavior by initializing display property bit of a | ||
| 5 | string processed by the bidirectional iterator. For details, see | ||
| 6 | <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>. | ||
| 7 | |||
| 1 | 2014-01-23 Paul Eggert <eggert@cs.ucla.edu> | 8 | 2014-01-23 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 9 | ||
| 3 | Minor cleanup of previous change. | 10 | Minor cleanup of previous change. |
diff --git a/src/xdisp.c b/src/xdisp.c index bd6630a23c3..e59612696e9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -6409,6 +6409,7 @@ reseat_1 (struct it *it, struct text_pos pos, int set_stop_p) | |||
| 6409 | it->bidi_it.string.s = NULL; | 6409 | it->bidi_it.string.s = NULL; |
| 6410 | it->bidi_it.string.lstring = Qnil; | 6410 | it->bidi_it.string.lstring = Qnil; |
| 6411 | it->bidi_it.string.bufpos = 0; | 6411 | it->bidi_it.string.bufpos = 0; |
| 6412 | it->bidi_it.string.from_disp_str = 0; | ||
| 6412 | it->bidi_it.string.unibyte = 0; | 6413 | it->bidi_it.string.unibyte = 0; |
| 6413 | it->bidi_it.w = it->w; | 6414 | it->bidi_it.w = it->w; |
| 6414 | } | 6415 | } |
| @@ -20411,6 +20412,7 @@ See also `bidi-paragraph-direction'. */) | |||
| 20411 | itb.string.s = NULL; | 20412 | itb.string.s = NULL; |
| 20412 | itb.string.lstring = Qnil; | 20413 | itb.string.lstring = Qnil; |
| 20413 | itb.string.bufpos = 0; | 20414 | itb.string.bufpos = 0; |
| 20415 | itb.string.from_disp_str = 0; | ||
| 20414 | itb.string.unibyte = 0; | 20416 | itb.string.unibyte = 0; |
| 20415 | /* We have no window to use here for ignoring window-specific | 20417 | /* We have no window to use here for ignoring window-specific |
| 20416 | overlays. Using NULL for window pointer will cause | 20418 | overlays. Using NULL for window pointer will cause |