aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorChong Yidong2010-01-09 17:32:47 -0500
committerChong Yidong2010-01-09 17:32:47 -0500
commite398c61cb14ef89632fa28fe97b98c71695d6ccc (patch)
tree9d0188c11c4277105eda2b82be4dcc335fd8b4fc /src/editfns.c
parent4d9bbfa616fb135ff54a63fcd965923d48ca64f1 (diff)
downloademacs-e398c61cb14ef89632fa28fe97b98c71695d6ccc.tar.gz
emacs-e398c61cb14ef89632fa28fe97b98c71695d6ccc.zip
Fix bounds checking for text properties in `format' (Bug#5306).
* intervals.h, textprop.c (extend_property_ranges): Return value and args changed. Discard properties that begin at or after the new end (Bug#5306). * editfns.c (Fformat): Caller changed.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/editfns.c b/src/editfns.c
index cb302f7b1e7..58e13b1ed7c 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4177,8 +4177,8 @@ usage: (format STRING &rest OBJECTS) */)
4177 len = make_number (SCHARS (args[n])); 4177 len = make_number (SCHARS (args[n]));
4178 new_len = make_number (info[n].end - info[n].start); 4178 new_len = make_number (info[n].end - info[n].start);
4179 props = text_property_list (args[n], make_number (0), len, Qnil); 4179 props = text_property_list (args[n], make_number (0), len, Qnil);
4180 extend_property_ranges (props, len, new_len); 4180 props = extend_property_ranges (props, new_len);
4181 /* If successive arguments have properites, be sure that 4181 /* If successive arguments have properties, be sure that
4182 the value of `composition' property be the copy. */ 4182 the value of `composition' property be the copy. */
4183 if (n > 1 && info[n - 1].end) 4183 if (n > 1 && info[n - 1].end)
4184 make_composition_value_copy (props); 4184 make_composition_value_copy (props);