commit | 88b1ba151ae7bb66dc92c85f1eb63fe7fcc03051 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Fri Jun 29 13:34:19 2012 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Fri Jun 29 13:34:19 2012 +0200 |
tree | 37f79b98a0f3847b8b09640582b7596bf8940848 | |
parent | a53c60d33c917455857de96a44e109da7d305d8a [diff] [blame] |
updated for version 7.3.573 Problem: Using array index before bounds checking. Solution: Swap the parts of the condition. (Dominique Pelle)
diff --git a/src/ops.c b/src/ops.c index 845211d..2c054d9 100644 --- a/src/ops.c +++ b/src/ops.c
@@ -6458,7 +6458,7 @@ long chars = 0; int is_word = 0; - for (i = 0; line[i] && i < limit; ) + for (i = 0; i < limit && line[i] != NUL; ) { if (is_word) {