Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/symbolize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,9 @@ static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(
Dl_info info;
if (dladdr(pc, &info)) {
if (info.dli_sname) {
if (strlen(info.dli_sname) < out_size) {
strcpy(out, info.dli_sname);
int name_length = strlen(info.dli_sname);
if (name_length < out_size) {
strlcpy(out, info.dli_sname, name_length);
// Symbolization succeeded. Now we try to demangle the symbol.
DemangleInplace(out, out_size);
return true;
Expand Down