Browse Source

bugfix: fixes segmentation fault on very long lines

merge-requests/365/head
Jørgen Lien Sellæg 9 years ago
parent
commit
443e08e86c
  1. 2
      src/ctags.cc

2
src/ctags.cc

@ -146,6 +146,8 @@ std::vector<Ctags::Location> Ctags::get_locations(const boost::filesystem::path
long best_score=LONG_MIN; long best_score=LONG_MIN;
std::vector<Location> best_locations; std::vector<Location> best_locations;
while(std::getline(*result.second, line)) { while(std::getline(*result.second, line)) {
if(line.size()>2048)
continue;
auto location=Ctags::get_location(line, false); auto location=Ctags::get_location(line, false);
if(!location.scope.empty()) { if(!location.scope.empty()) {
if(location.scope+"::"+location.symbol!=name) if(location.scope+"::"+location.symbol!=name)

Loading…
Cancel
Save