From 4f20443995b7e8b90058be829bbbbad8f5f8c935 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 23 Oct 2005 20:03:47 +0000 Subject: Bug #1860: Prevent walking off the end of the scan_types array. --- lisp/xedit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/xedit.c b/lisp/xedit.c index 7fa1748..5b01c93 100644 --- a/lisp/xedit.c +++ b/lisp/xedit.c @@ -114,7 +114,7 @@ static LispObj interactive_arguments[4]; static LispObj *justify_modes[4]; static LispObj *wrap_modes[3]; -static LispObj *scan_types[5]; +static LispObj *scan_types[6]; static LispObj *scan_directions[2]; static LispObj execute_stream; static LispString execute_string; @@ -1483,10 +1483,10 @@ Xedit_Scan(LispBuiltin *builtin) STRFUN(builtin), STROBJ(odirection)); direction = (XawTextScanDirection)i; - for (i = 0; i < 5; i++) + for (i = 0; i < 6; i++) if (otype == scan_types[i]) break; - if (i >= 5) + if (i >= 6) LispDestroy("%s: direction must be " ":POSITIONS, :WHITE-SPACE, :EOL, " ":PARAGRAPH, :ALL, or :ALPHA-NUMERIC, not %s", -- cgit v1.2.3