diff options
author | Neil <nyamatongwe@gmail.com> | 2021-09-02 14:25:24 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-09-02 14:25:24 +1000 |
commit | c9c7c193586c27faaaf7b33b529a47aa200dfdc8 (patch) | |
tree | 8e1679eee2ce952c6b814c03b9ba7017e75ae0b7 /src/Document.cxx | |
parent | ed9b464d422a3c55d1a654bff02f5a39ace3d551 (diff) | |
download | scintilla-mirror-c9c7c193586c27faaaf7b33b529a47aa200dfdc8.tar.gz |
Bug [#2281] Fix crash with too many subexpressions in regular expression search
with SCFIND_CXX11REGEX.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 657191ee1..8baa84ad8 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -3208,7 +3208,7 @@ bool MatchOnLines(const Document *doc, const Regex ®exp, const RESearchRange } #endif if (matched) { - for (size_t co = 0; co < match.size(); co++) { + for (size_t co = 0; co < match.size() && co < RESearch::MAXTAG; co++) { search.bopat[co] = match[co].first.Pos(); search.eopat[co] = match[co].second.PosRoundUp(); const Sci::Position lenMatch = search.eopat[co] - search.bopat[co]; |