aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2001-12-07 13:35:25 +0000
committerAndreas Schwab2001-12-07 13:35:25 +0000
commitb85238397a4bfe4391e23029fce5ab6ff3fa2937 (patch)
treee4a0c26ea6c9ff62e57aafefa11ce85cc49b1f85
parent81a8491d8a18bc1c2a3b82decaec402be5bbc23d (diff)
downloademacs-b85238397a4bfe4391e23029fce5ab6ff3fa2937.tar.gz
emacs-b85238397a4bfe4391e23029fce5ab6ff3fa2937.zip
(display_mode_element): Don't read past end of string if it ends with '%'.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xdisp.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0759eb45bea..5dc65795829 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12001-12-07 Andreas Schwab <schwab@suse.de> 12001-12-07 Andreas Schwab <schwab@suse.de>
2 2
3 * xdisp.c (display_mode_element): Don't read past end of string if
4 it ends with '%'.
5
3 * alloc.c (inhibit_garbage_collection): Don't exceed value an int 6 * alloc.c (inhibit_garbage_collection): Don't exceed value an int
4 can hold. 7 can hold.
5 8
diff --git a/src/xdisp.c b/src/xdisp.c
index d103230a698..91558067d1f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13461,7 +13461,7 @@ display_mode_line (w, face_id, format)
13461 FIELD_WIDTH is the number of characters the display of ELT should 13461 FIELD_WIDTH is the number of characters the display of ELT should
13462 occupy in the mode line, and PRECISION is the maximum number of 13462 occupy in the mode line, and PRECISION is the maximum number of
13463 characters to display from ELT's representation. See 13463 characters to display from ELT's representation. See
13464 display_string for details. * 13464 display_string for details.
13465 13465
13466 Returns the hpos of the end of the text generated by ELT. */ 13466 Returns the hpos of the end of the text generated by ELT. */
13467 13467
@@ -13584,6 +13584,8 @@ display_mode_element (it, depth, field_width, precision, elt)
13584 } 13584 }
13585 } 13585 }
13586 } 13586 }
13587 else /* c == 0 */
13588 break;
13587 } 13589 }
13588 } 13590 }
13589 } 13591 }