From 88b1ba151ae7bb66dc92c85f1eb63fe7fcc03051 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 29 Jun 2012 13:34:19 +0200 Subject: [PATCH] updated for version 7.3.573 Problem: Using array index before bounds checking. Solution: Swap the parts of the condition. (Dominique Pelle) --- src/ops.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ops.c b/src/ops.c index 845211dff6..2c054d9b88 100644 --- a/src/ops.c +++ b/src/ops.c @@ -6458,7 +6458,7 @@ line_count_info(line, wc, cc, limit, eol_size) 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) { diff --git a/src/version.c b/src/version.c index d424af75f8..ebe1988100 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 573, /**/ 572, /**/