(Fchar_equal): Check they are valid characters.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 17 Mar 2008 20:23:06 +0000 (20:23 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 17 Mar 2008 20:23:06 +0000 (20:23 +0000)
src/ChangeLog
src/editfns.c

index ceaa1e8..c9bb095 100644 (file)
@@ -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>
index 0ab1630..264097f 100644 (file)
@@ -4185,8 +4185,10 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer.  */)
      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;