Skip to content

Commit

Permalink
Fix ASAN failure in cxa_demangle
Browse files Browse the repository at this point in the history
Found with ASAN + libFuzzer by Kostya Serebryany <[email protected]>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293330 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
joker-eph committed Jan 27, 2017
1 parent 194c9f4 commit e169855
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Demangle/ItaniumDemangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,8 @@ static const char *parse_function_type(const char *first, const char *last,
int ref_qual = 0;
while (true) {
if (t == last) {
db.names.pop_back();
if (!db.names.empty())
db.names.pop_back();
return first;
}
if (*t == 'E') {
Expand Down

0 comments on commit e169855

Please sign in to comment.