# HG changeset patch # User Bram Moolenaar # Date 1340969659 -7200 # Node ID 802b1a1b275f5c8f95724d50d53642f221621d79 # Parent 5f703b8e1d4e800816b15c61f759563c14733a52 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 --- a/src/ops.c +++ b/src/ops.c @@ -6458,7 +6458,7 @@ line_count_info(line, wc, cc, limit, eol 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 --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 573, +/**/ 572, /**/ 571,