From 253c3c8280d304b37961df50fa209ec3c4c7eb44 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 17 Mar 2008 20:23:06 +0000 Subject: [PATCH] (Fchar_equal): Check they are valid characters. --- src/ChangeLog | 2 ++ src/editfns.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ceaa1e81c0c..c9bb095afea 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2008-03-17 Stefan Monnier + * editfns.c (Fchar_equal): Check they are valid characters. + * buffer.h (Fbuffer_list): Declare (for use in callint.c). 2008-03-17 Andreas Schwab diff --git a/src/editfns.c b/src/editfns.c index 0ab1630df3c..264097ffe59 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -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; -- 2.39.5