diff src/editfns.c @ 106780:85fd976607be

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.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 09 Jan 2010 17:32:47 -0500
parents 736322971285
children 4040ecb0c904
line wrap: on
line diff
--- a/src/editfns.c	Sat Jan 09 16:14:50 2010 -0500
+++ b/src/editfns.c	Sat Jan 09 17:32:47 2010 -0500
@@ -4177,8 +4177,8 @@
 	      len = make_number (SCHARS (args[n]));
 	      new_len = make_number (info[n].end - info[n].start);
 	      props = text_property_list (args[n], make_number (0), len, Qnil);
-	      extend_property_ranges (props, len, new_len);
-	      /* If successive arguments have properites, be sure that
+	      props = extend_property_ranges (props, new_len);
+	      /* If successive arguments have properties, be sure that
 		 the value of `composition' property be the copy.  */
 	      if (n > 1 && info[n - 1].end)
 		make_composition_value_copy (props);