Show More
@@ -1185,7 +1185,7 b' def _buildmatch(kindpats, globsuffix, li' | |||
|
1185 | 1185 | return regex, lambda f: any(mf(f) for mf in matchfuncs) |
|
1186 | 1186 | |
|
1187 | 1187 | MAX_RE_SIZE = 20000 |
|
1188 |
_BASE_SIZE = len('(?:)') |
|
|
1188 | _BASE_SIZE = len('(?:)') | |
|
1189 | 1189 | |
|
1190 | 1190 | def _joinregexes(regexps): |
|
1191 | 1191 | """gather multiple regular expressions into a single one""" |
@@ -1215,7 +1215,7 b' def _buildregexmatch(kindpats, globsuffi' | |||
|
1215 | 1215 | if (piecesize + 4) > MAX_RE_SIZE: |
|
1216 | 1216 | msg = _("matcher pattern is too long (%d bytes)") % piecesize |
|
1217 | 1217 | raise error.Abort(msg) |
|
1218 |
elif (groupsize |
|
|
1218 | elif (groupsize + piecesize) > MAX_RE_SIZE: | |
|
1219 | 1219 | group = regexps[startidx:idx] |
|
1220 | 1220 | allgroups.append(_joinregexes(group)) |
|
1221 | 1221 | startidx = idx |
General Comments 0
You need to be logged in to leave comments.
Login now