Fix a null pointer dereference if dladdr is unable to find a symbol name (flutter/engine#23970)
This commit is contained in:
@@ -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});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user