Skip to content

Commit

Permalink
Fix #23581 - (again) another infinite loop in the dwarf parser ##crash
Browse files Browse the repository at this point in the history
  • Loading branch information
radare authored and trufae committed Nov 15, 2024
1 parent 0c9f8c4 commit 21f9839
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libr/bin/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,12 @@ static const ut8 *parse_line_header_source_dwarf5(RBin *bin, RBinFile *bf, const
hdr->file_names[count].name = name;
}
} else {
add_sdb_include_dir (sdb, name, index);
free (name);
if (name) {
add_sdb_include_dir (sdb, name, index);
free (name);
} else {
buf = NULL;
}
}
name = NULL;
break;
Expand Down

0 comments on commit 21f9839

Please sign in to comment.