Fix infinite loop in the xtac parser ##bin

This commit is contained in:
pancake 2023-03-06 10:40:51 +01:00
parent 31d3ff83c1
commit ab7e2eea7f
1 changed files with 5 additions and 1 deletions

View File

@ -425,7 +425,11 @@ static bool r_bin_xtac_read_xtac_linked_list(RBinXtacObj *bin) {
}
r_list_append (bin->xtac_linked_list, entry);
p_xtac_linked_list_entry += GET_OFFSET (entry->meta_and_offset) * 4;
int a = entry->meta_and_offset;
if (a < 1) {
break;
}
p_xtac_linked_list_entry += (a * 4);
} while (p_xtac_linked_list_entry < bin->header->ptr_to_addr_pairs);
if (GET_OFFSET (entry->meta_and_offset) != 0x0FFFFFFF) {