diff options
author | Eli Zaretskii <eliz@gnu.org> | 2012-09-22 15:31:05 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2012-09-22 15:31:05 +0300 |
commit | 589bd69b63c7f9513d3ee9053f4a4d3bfe7705e0 (patch) | |
tree | e907bb8fcfc1e20d2c4a892372442e72e8b58382 | |
parent | bbe099e709d5c89eb638e190cc96dfb8bea5e887 (diff) | |
download | emacs-589bd69b63c7f9513d3ee9053f4a4d3bfe7705e0.tar.gz |
Fix bug #10159 with crashes in auto-complete package.
src/xdisp.c (next_overlay_string): Initialize it->end_charpos for
the new overlay string. Otherwise, the call to composition_compute_stop_pos
in compute_stop_pos uses a wrong it->end_charpos value, and crashes because
it runs off the end of the overlay string.
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/xdisp.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 847e065e1c3..4033f51ca1a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-22 Eli Zaretskii <eliz@gnu.org> + + * xdisp.c (next_overlay_string): Initialize it->end_charpos for + the new overlay string. (Bug#10159) + 2012-09-22 Paul Eggert <eggert@cs.ucla.edu> * emacs.c (shut_down_emacs): Don't assume stderr is buffered, diff --git a/src/xdisp.c b/src/xdisp.c index f00719be37a..c2032696a1c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5346,6 +5346,7 @@ next_overlay_string (struct it *it) SET_TEXT_POS (it->current.string_pos, 0, 0); it->method = GET_FROM_STRING; it->stop_charpos = 0; + it->end_charpos = SCHARS (it->string); if (it->cmp_it.stop_pos >= 0) it->cmp_it.stop_pos = 0; it->prev_stop = 0; |