Skip to content

Commit

Permalink
Merge pull request #9261 from davidlt/cutparser-random-mem-bug
Browse files Browse the repository at this point in the history
Fix use-after-free bug in typeCode
  • Loading branch information
davidlange6 committed May 28, 2015
2 parents 94bed3c + 1ef5ad9 commit 381b37e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CommonTools/Utils/src/returnType.cc
Expand Up @@ -43,9 +43,9 @@ namespace reco {

TypeCode typeCode(const edm::TypeWithDict& t) {
typedef std::pair<const char* const, method::TypeCode> Values;
const char* name = t.name().c_str();
std::string name = t.name();
auto f = std::equal_range(retTypeVec.begin(), retTypeVec.end(),
Values{name, enumType},
Values{name.c_str(), enumType},
[](const Values& iLHS, const Values& iRHS) -> bool {
return std::strcmp(iLHS.first, iRHS.first) < 0;
});
Expand Down

0 comments on commit 381b37e

Please sign in to comment.