[llvm] r304114 - [ItaniumDemangle] Fix a exponential string copying bug
Erik Pilkington via llvm-commits
llvm-commits at lists.llvm.org
Sun May 28 16:24:53 PDT 2017
Author: epilk
Date: Sun May 28 18:24:52 2017
New Revision: 304114
URL: http://llvm.org/viewvc/llvm-project?rev=304114&view=rev
Log:
[ItaniumDemangle] Fix a exponential string copying bug
This is a port of libcxxabi's r304113.
Modified:
llvm/trunk/lib/Demangle/ItaniumDemangle.cpp
Modified: llvm/trunk/lib/Demangle/ItaniumDemangle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/ItaniumDemangle.cpp?rev=304114&r1=304113&r2=304114&view=diff
==============================================================================
--- llvm/trunk/lib/Demangle/ItaniumDemangle.cpp (original)
+++ llvm/trunk/lib/Demangle/ItaniumDemangle.cpp Sun May 28 18:24:52 2017
@@ -2525,6 +2525,9 @@ static std::string base_name(std::string
++p0;
break;
}
+ if (!isalpha(*p0) && !isdigit(*p0) && *p0 != '_') {
+ return std::string();
+ }
}
return std::string(p0, pe);
}
More information about the llvm-commits
mailing list