forked from OSchip/llvm-project
[ItaniumDemangle] Fix a exponential string copying bug
This is a port of libcxxabi's r304113. llvm-svn: 304114
This commit is contained in:
parent
a34ea7583f
commit
de83eea576
|
@ -2525,6 +2525,9 @@ static std::string base_name(std::string &s) {
|
|||
++p0;
|
||||
break;
|
||||
}
|
||||
if (!isalpha(*p0) && !isdigit(*p0) && *p0 != '_') {
|
||||
return std::string();
|
||||
}
|
||||
}
|
||||
return std::string(p0, pe);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue