From ed68d1ff287d43c5293abb4d41e908aa8e50afec Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 2 Jul 2014 21:14:01 +0100 Subject: utf8: use end of sequence iterators for more security --- src/normal.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/normal.cc') diff --git a/src/normal.cc b/src/normal.cc index 6a5468b4..5c073220 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -719,7 +719,7 @@ void keep(Context& context, int) for (auto& sel : context.selections()) { if (boost::regex_search(buffer.iterator_at(sel.min()), - utf8::next(buffer.iterator_at(sel.max())), ex) == matching) + utf8::next(buffer.iterator_at(sel.max()), buffer.end()), ex) == matching) keep.push_back(sel); } if (keep.empty()) -- cgit v1.2.3