1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

[ItaniumDemangle] Fix a exponential string copying bug

This is a port of libcxxabi's r304113.

llvm-svn: 304114
This commit is contained in:
Erik Pilkington 2017-05-28 23:24:52 +00:00
parent ca93544710
commit 970bccb2f3

View File

@ -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);
}