mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.0.0165: ubsan warns for integer overflow
Problem: Ubsan warns for integer overflow. Solution: Swap two conditions. (Dominique Pelle)
This commit is contained in:
@@ -50,7 +50,7 @@ enum
|
|||||||
NFA_CONCAT, /* concatenate two previous items (postfix
|
NFA_CONCAT, /* concatenate two previous items (postfix
|
||||||
* only) */
|
* only) */
|
||||||
NFA_OR, /* \| (postfix only) */
|
NFA_OR, /* \| (postfix only) */
|
||||||
NFA_STAR, /* greedy * (posfix only) */
|
NFA_STAR, /* greedy * (postfix only) */
|
||||||
NFA_STAR_NONGREEDY, /* non-greedy * (postfix only) */
|
NFA_STAR_NONGREEDY, /* non-greedy * (postfix only) */
|
||||||
NFA_QUEST, /* greedy \? (postfix only) */
|
NFA_QUEST, /* greedy \? (postfix only) */
|
||||||
NFA_QUEST_NONGREEDY, /* non-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
|
* maximum is much larger than the minimum and when the maximum is
|
||||||
* large. Bail out if we can use the other engine. */
|
* large. Bail out if we can use the other engine. */
|
||||||
if ((nfa_re_flags & RE_AUTO)
|
if ((nfa_re_flags & RE_AUTO)
|
||||||
&& (maxval > minval + 200 || maxval > 500))
|
&& (maxval > 500 || maxval > minval + 200))
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
|
||||||
/* Ignore previous call to nfa_regatom() */
|
/* Ignore previous call to nfa_regatom() */
|
||||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
165,
|
||||||
/**/
|
/**/
|
||||||
164,
|
164,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user