changeset 3626:802b1a1b275f v7.3.573

updated for version 7.3.573 Problem: Using array index before bounds checking. Solution: Swap the parts of the condition. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Fri, 29 Jun 2012 13:34:19 +0200
parents 5f703b8e1d4e
children c1bf4ba956d1
files src/ops.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)
 	{
--- 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,