From 443e08e86c6a8c57d4d33c94f495faf969507d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Thu, 1 Sep 2016 00:44:52 +0200 Subject: [PATCH] bugfix: fixes segmentation fault on very long lines --- src/ctags.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ctags.cc b/src/ctags.cc index 5ef7a69..0a51bbc 100644 --- a/src/ctags.cc +++ b/src/ctags.cc @@ -146,6 +146,8 @@ std::vector Ctags::get_locations(const boost::filesystem::path long best_score=LONG_MIN; std::vector best_locations; while(std::getline(*result.second, line)) { + if(line.size()>2048) + continue; auto location=Ctags::get_location(line, false); if(!location.scope.empty()) { if(location.scope+"::"+location.symbol!=name)