Fix #23581 - (again) another infinite loop in the dwarf parser ##crash

This commit is contained in:
pancake 2024-11-15 20:45:50 +01:00 committed by pancake
parent 0c9f8c4266
commit 21f9839ab0

View File

@ -844,8 +844,12 @@ static const ut8 *parse_line_header_source_dwarf5(RBin *bin, RBinFile *bf, const
hdr->file_names[count].name = name; hdr->file_names[count].name = name;
} }
} else { } else {
add_sdb_include_dir (sdb, name, index); if (name) {
free (name); add_sdb_include_dir (sdb, name, index);
free (name);
} else {
buf = NULL;
}
} }
name = NULL; name = NULL;
break; break;