diff options
| author | Eli Zaretskii | 2012-06-16 13:18:21 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2012-06-16 13:18:21 +0300 |
| commit | 1097afe4554bd14af9817100d9a53d6be628656e (patch) | |
| tree | 73ff4deff698c96d9447899c6b8826986bc53a57 | |
| parent | 2f07e6afc932d0be7256c7700e9c11d61075aeaf (diff) | |
| download | emacs-1097afe4554bd14af9817100d9a53d6be628656e.tar.gz emacs-1097afe4554bd14af9817100d9a53d6be628656e.zip | |
Fix bug #11653 with a crash when more than 16 overlay strings are loaded.
src/xdisp.c (handle_face_prop): Use chunk-relative overlay string index when
indexing into it->string_overlays array.
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3138bea28fa..3f73b1ad702 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,7 +3,9 @@ | |||
| 3 | * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end. If | 3 | * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end. If |
| 4 | all the glyphs of the glyph row came from strings, and we have no | 4 | all the glyphs of the glyph row came from strings, and we have no |
| 5 | cursor positioning clues, put the cursor on the first glyph of the | 5 | cursor positioning clues, put the cursor on the first glyph of the |
| 6 | row. (Bug#11653) | 6 | row. |
| 7 | (handle_face_prop): Use chunk-relative overlay string index when | ||
| 8 | indexing into it->string_overlays array. (Bug#11653) | ||
| 7 | 9 | ||
| 8 | 2012-06-16 Andreas Schwab <schwab@linux-m68k.org> | 10 | 2012-06-16 Andreas Schwab <schwab@linux-m68k.org> |
| 9 | 11 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index e09116fe0ca..aa130c5d50a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3691,7 +3691,8 @@ handle_face_prop (struct it *it) | |||
| 3691 | int i; | 3691 | int i; |
| 3692 | Lisp_Object from_overlay | 3692 | Lisp_Object from_overlay |
| 3693 | = (it->current.overlay_string_index >= 0 | 3693 | = (it->current.overlay_string_index >= 0 |
| 3694 | ? it->string_overlays[it->current.overlay_string_index] | 3694 | ? it->string_overlays[it->current.overlay_string_index |
| 3695 | % OVERLAY_STRING_CHUNK_SIZE] | ||
| 3695 | : Qnil); | 3696 | : Qnil); |
| 3696 | 3697 | ||
| 3697 | /* See if we got to this string directly or indirectly from | 3698 | /* See if we got to this string directly or indirectly from |
| @@ -3705,7 +3706,8 @@ handle_face_prop (struct it *it) | |||
| 3705 | { | 3706 | { |
| 3706 | if (it->stack[i].current.overlay_string_index >= 0) | 3707 | if (it->stack[i].current.overlay_string_index >= 0) |
| 3707 | from_overlay | 3708 | from_overlay |
| 3708 | = it->string_overlays[it->stack[i].current.overlay_string_index]; | 3709 | = it->string_overlays[it->stack[i].current.overlay_string_index |
| 3710 | % OVERLAY_STRING_CHUNK_SIZE]; | ||
| 3709 | else if (! NILP (it->stack[i].from_overlay)) | 3711 | else if (! NILP (it->stack[i].from_overlay)) |
| 3710 | from_overlay = it->stack[i].from_overlay; | 3712 | from_overlay = it->stack[i].from_overlay; |
| 3711 | 3713 | ||