mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:8.0.0165 (#7132)
Problem: Ubsan warns for integer overflow.
Solution: Swap two conditions. (Dominique Pelle)
f446b48ff0
This commit is contained in:

committed by
Justin M. Keyes

parent
de1084f3c4
commit
b7e84de7d2
@@ -56,13 +56,13 @@ enum {
|
|||||||
NFA_RANGE_MIN, /* low end of a range */
|
NFA_RANGE_MIN, /* low end of a range */
|
||||||
NFA_RANGE_MAX, /* high end of a range */
|
NFA_RANGE_MAX, /* high end of a range */
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
NFA_BOL, /* ^ Begin line */
|
NFA_BOL, /* ^ Begin line */
|
||||||
NFA_EOL, /* $ End line */
|
NFA_EOL, /* $ End line */
|
||||||
@@ -1988,7 +1988,7 @@ static int nfa_regpiece(void)
|
|||||||
// The engine is very inefficient (uses too many states) when the maximum
|
// The engine is very inefficient (uses too many states) when the maximum
|
||||||
// is much larger than the minimum and when the maximum is large. Bail out
|
// is much larger than the minimum and when the maximum is large. Bail out
|
||||||
// if we can use the other engine.
|
// if we can use the other engine.
|
||||||
if ((nfa_re_flags & RE_AUTO) && (maxval > minval + 200 || maxval > 500)) {
|
if ((nfa_re_flags & RE_AUTO) && (maxval > 500 || maxval > minval + 200)) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -787,7 +787,7 @@ static const int included_patches[] = {
|
|||||||
168,
|
168,
|
||||||
167,
|
167,
|
||||||
// 166,
|
// 166,
|
||||||
// 165,
|
165,
|
||||||
// 164,
|
// 164,
|
||||||
// 163 NA
|
// 163 NA
|
||||||
// 162 NA
|
// 162 NA
|
||||||
|
Reference in New Issue
Block a user