changeset 10551:c3cc8b2aab6a v8.0.0165

patch 8.0.0165: ubsan warns for integer overflow commit https://github.com/vim/vim/commit/f446b48ff0bffae2b453cd4f9e3c25dfe363d29d Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 10 13:55:14 2017 +0100 patch 8.0.0165: ubsan warns for integer overflow Problem: Ubsan warns for integer overflow. Solution: Swap two conditions. (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Tue, 10 Jan 2017 14:00:05 +0100
parents 5fae5050a20c
children fb7cdd106c9b
files src/regexp_nfa.c src/version.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -50,7 +50,7 @@ enum
     NFA_CONCAT,			    /* concatenate two previous items (postfix
 				     * only) */
     NFA_OR,			    /* \| (postfix only) */
-    NFA_STAR,			    /* greedy * (posfix only) */
+    NFA_STAR,			    /* greedy * (postfix only) */
     NFA_STAR_NONGREEDY,		    /* non-greedy * (postfix only) */
     NFA_QUEST,			    /* greedy \? (postfix only) */
     NFA_QUEST_NONGREEDY,	    /* non-greedy \? (postfix only) */
@@ -2169,7 +2169,7 @@ nfa_regpiece(void)
 	     * maximum is much larger than the minimum and when the maximum is
 	     * large.  Bail out if we can use the other engine. */
 	    if ((nfa_re_flags & RE_AUTO)
-				   && (maxval > minval + 200 || maxval > 500))
+				   && (maxval > 500 || maxval > minval + 200))
 		return FAIL;
 
 	    /* Ignore previous call to nfa_regatom() */
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    165,
+/**/
     164,
 /**/
     163,