Skip to content

Commit f446b48

Browse files
committed
patch 8.0.0165: ubsan warns for integer overflow
Problem: Ubsan warns for integer overflow. Solution: Swap two conditions. (Dominique Pelle)
1 parent caa55b6 commit f446b48

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/regexp_nfa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ enum
5050
NFA_CONCAT, /* concatenate two previous items (postfix
5151
* only) */
5252
NFA_OR, /* \| (postfix only) */
53-
NFA_STAR, /* greedy * (posfix only) */
53+
NFA_STAR, /* greedy * (postfix only) */
5454
NFA_STAR_NONGREEDY, /* non-greedy * (postfix only) */
5555
NFA_QUEST, /* greedy \? (postfix only) */
5656
NFA_QUEST_NONGREEDY, /* non-greedy \? (postfix only) */
@@ -2169,7 +2169,7 @@ nfa_regpiece(void)
21692169
* maximum is much larger than the minimum and when the maximum is
21702170
* large. Bail out if we can use the other engine. */
21712171
if ((nfa_re_flags & RE_AUTO)
2172-
&& (maxval > minval + 200 || maxval > 500))
2172+
&& (maxval > 500 || maxval > minval + 200))
21732173
return FAIL;
21742174

21752175
/* Ignore previous call to nfa_regatom() */

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
165,
767769
/**/
768770
164,
769771
/**/

0 commit comments

Comments
 (0)