From: Djordje Todorovic Date: Tue, 26 Sep 2017 13:40:25 +0000 (+0200) Subject: dwarflint: Avoid corrupted access X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d55504647dc70ec50156e14d620ba7c0ec6ae368;p=thirdparty%2Felfutils.git dwarflint: Avoid corrupted access Signed-off-by: Djordje Todorovic --- diff --git a/dwarflint/locstats.cc b/dwarflint/locstats.cc index 411e06cd1..4f0507b4c 100644 --- a/dwarflint/locstats.cc +++ b/dwarflint/locstats.cc @@ -622,7 +622,8 @@ process(Dwarf *c_dw, dwarf const &dw) std::cout << "cov%\tsamples\tcumul" << std::endl; for (int i = cov_00; i <= 100; ++i) { - cumulative += tally.find (i)->second; + if (tally.find (i) != tally.end()) + cumulative += tally.find (i)->second; if (tabrules.match (i)) { long int samples = cumulative - last;