Skip to content

Commit

Permalink
Fix a null pointer dereference if dladdr is unable to find a symbol n…
Browse files Browse the repository at this point in the history
…ame (flutter#23970)
  • Loading branch information
jason-simmons authored Jan 27, 2021
1 parent 696c871 commit e3e413e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fml/backtrace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ static std::string GetSymbolName(void* symbol) {
if (::dladdr(symbol, &info) == 0) {
return kKUnknownFrameName;
}
if (info.dli_sname == nullptr) {
return kKUnknownFrameName;
}

return DemangleSymbolName({info.dli_sname});
}
Expand Down

0 comments on commit e3e413e

Please sign in to comment.