aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-02-25 21:50:21 +0000
committerKim F. Storm2005-02-25 21:50:21 +0000
commitfcd9b9d0f8c9c59f74b4ebb11bb446b1413b4c2f (patch)
treea7e85d469b74adf8779f2908e8a9dbcbe28d40ad /src
parente9323aedda92fe5eaeb9d5c1e81fed30024facb9 (diff)
downloademacs-fcd9b9d0f8c9c59f74b4ebb11bb446b1413b4c2f.tar.gz
emacs-fcd9b9d0f8c9c59f74b4ebb11bb446b1413b4c2f.zip
(init_from_display_pos): Don't read past end of
it->overlay_strings array.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index dd10551d5fa..8d977ea20fb 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2538,7 +2538,10 @@ init_from_display_pos (it, w, pos)
2538 after-string. */ 2538 after-string. */
2539 init_iterator (it, w, charpos, bytepos, NULL, DEFAULT_FACE_ID); 2539 init_iterator (it, w, charpos, bytepos, NULL, DEFAULT_FACE_ID);
2540 2540
2541 for (i = 0; i < it->n_overlay_strings; ++i) 2541 /* This only scans the current chunk -- it should scan all chunks.
2542 However, OVERLAY_STRING_CHUNK_SIZE has been increased from 3 in 21.1
2543 to 16 in 22.1 to make this a lesser problem. */
2544 for (i = 0; i < it->n_overlay_strings && i < OVERLAY_STRING_CHUNK_SIZE; ++i)
2542 { 2545 {
2543 const char *s = SDATA (it->overlay_strings[i]); 2546 const char *s = SDATA (it->overlay_strings[i]);
2544 const char *e = s + SBYTES (it->overlay_strings[i]); 2547 const char *e = s + SBYTES (it->overlay_strings[i]);