diff options
author | Adam Jackson <ajax@nwnk.net> | 2005-10-23 20:03:47 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2005-10-23 20:03:47 +0000 |
commit | 4f20443995b7e8b90058be829bbbbad8f5f8c935 (patch) | |
tree | 35d493033442c470467cb0f79eb810dda13a5dff /lisp/xedit.c | |
parent | 83ba7062d74bb228ba9daddd1f4524dee905d4f2 (diff) |
Bug #1860: Prevent walking off the end of the scan_types array.
Diffstat (limited to 'lisp/xedit.c')
-rw-r--r-- | lisp/xedit.c | 6 |
1 files changed, 3 insertions, 3 deletions
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", |