changeset 93038:a2c4bffe2b59

(Fchar_equal): Check they are valid characters.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 17 Mar 2008 20:23:06 +0000
parents cbb561d8b117
children e48df1ee4371
files src/ChangeLog src/editfns.c
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Mar 17 20:21:12 2008 +0000
+++ b/src/ChangeLog	Mon Mar 17 20:23:06 2008 +0000
@@ -1,5 +1,7 @@
 2008-03-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* editfns.c (Fchar_equal): Check they are valid characters.
+
 	* buffer.h (Fbuffer_list): Declare (for use in callint.c).
 
 2008-03-17  Andreas Schwab  <schwab@suse.de>
--- a/src/editfns.c	Mon Mar 17 20:21:12 2008 +0000
+++ b/src/editfns.c	Mon Mar 17 20:23:06 2008 +0000
@@ -4185,8 +4185,10 @@
      register Lisp_Object c1, c2;
 {
   int i1, i2;
-  CHECK_NUMBER (c1);
-  CHECK_NUMBER (c2);
+  /* Check they're chars, not just integers, otherwise we could get array
+     bounds violations in DOWNCASE.  */
+  CHECK_CHARACTER (c1);
+  CHECK_CHARACTER (c2);
 
   if (XINT (c1) == XINT (c2))
     return Qt;