Commit 65765bef authored by Petri Hintukainen's avatar Petri Hintukainen

Fix infinite loop (corrupt input)

parent bc8f0d7d
...@@ -584,6 +584,11 @@ static int _parse_udf_partition_maps(udfread_block_input *input, ...@@ -584,6 +584,11 @@ static int _parse_udf_partition_maps(udfread_block_input *input,
uint8_t len = _get_u8(map + 1); uint8_t len = _get_u8(map + 1);
uint16_t ref; uint16_t ref;
if (len < 2) {
udf_error("invalid partition map length %d\n", (int)len);
break;
}
udf_trace("map %u: type %u\n", i, type); udf_trace("map %u: type %u\n", i, type);
if (map + len > end) { if (map + len > end) {
udf_error("partition map table too short !\n"); udf_error("partition map table too short !\n");
......
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