Skip to content

Commit

Permalink
Fix string size on regexp search all
Browse files Browse the repository at this point in the history
  • Loading branch information
zimmerle committed Jan 14, 2017
1 parent 36d6bb9 commit 3a41308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/regex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ std::list<SMatch> Regex::searchAll(const std::string& s) {
size_t start = ovector[2*i];
size_t end = ovector[2*i+1];
size_t len = end - start;
if (end >= s.size()) {
if (end > s.size()) {
continue;
}
match.match = std::string(tmpString, start, len);
Expand Down

0 comments on commit 3a41308

Please sign in to comment.