Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use-after-free bug in typeCode #9261

Merged
merged 1 commit into from May 28, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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