Commit a49bdfa4 authored by Petri Hintukainen's avatar Petri Hintukainen

Check metadata partition file type

parent 75f69c13
...@@ -509,7 +509,11 @@ static int _map_metadata_partition(udfread_block_input *input, ...@@ -509,7 +509,11 @@ static int _map_metadata_partition(udfread_block_input *input,
continue; continue;
} }
if (fe->file_type == UDF_FT_METADATA) { if (fe->content_inline) {
udf_error("invalid metadata file (content inline)\n");
} else if (!fe->num_ad) {
udf_error("invalid metadata file (no allocation descriptors)\n");
} else if (fe->file_type == UDF_FT_METADATA) {
part->p[1].lba = pd->start_block + fe->data.ad[0].lba; part->p[1].lba = pd->start_block + fe->data.ad[0].lba;
udf_log("metadata file at lba %u\n", part->p[1].lba); udf_log("metadata file at lba %u\n", part->p[1].lba);
} else if (fe->file_type == UDF_FT_METADATA_MIRROR) { } else if (fe->file_type == UDF_FT_METADATA_MIRROR) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment