summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2017-08-01 02:38:41 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2017-08-01 02:38:41 +0000
commitb90082274531c38eb75bb5d30aac876d338004ea (patch)
tree19556c4eb2278943913d393fa9a13b7275323c04 /src
parentd25d9018b6c470126aa89c9c6b2c7e8e9c78ef5c (diff)
[demangler] Fix another bug found by oss-fuzz in r309340
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@309650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src')
-rw-r--r--src/cxa_demangle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cxa_demangle.cpp b/src/cxa_demangle.cpp
index e13358b..88990a2 100644
--- a/src/cxa_demangle.cpp
+++ b/src/cxa_demangle.cpp
@@ -5867,6 +5867,8 @@ parse_encoding(const char* first, const char* last, Db& db)
if (t != last && *t == 'v')
{
++t;
+ if (db.names.empty())
+ return first;
Node* name = db.names.back();
db.names.pop_back();
result = db.make<TopLevelFunctionDecl>(