Virtual ISO: Don't crash if there's no memory for the entry map

This commit is contained in:
RichardG867
2022-03-27 18:30:42 -03:00
parent 65bbaf4ce0
commit 1a589eb178

View File

@@ -1195,6 +1195,8 @@ next_entry:
/* Allocate entry map for sector->file lookups. */
viso->entry_map = (viso_entry_t **) calloc(viso->entry_map_size, sizeof(viso_entry_t *));
if (!viso->entry_map)
goto end;
viso->metadata_sectors = ftello64(viso->tf.file) / viso->sector_size;
viso->all_sectors = viso->metadata_sectors;