summaryrefslogtreecommitdiffstats
path: root/libblkid
diff options
context:
space:
mode:
authorPali Rohár2017-11-15 18:12:50 +0100
committerPali Rohár2017-11-15 18:12:50 +0100
commit4572e4070d2255801cad0648a8e1e9fc37af8aaa (patch)
tree27cfc504c7b697b92d3c1f526d255595f38c3c87 /libblkid
parentlibblkid: udf: Really try to read only first LVID (diff)
downloadkernel-qcow2-util-linux-4572e4070d2255801cad0648a8e1e9fc37af8aaa.tar.gz
kernel-qcow2-util-linux-4572e4070d2255801cad0648a8e1e9fc37af8aaa.tar.xz
kernel-qcow2-util-linux-4572e4070d2255801cad0648a8e1e9fc37af8aaa.zip
libblkid: udf: Stop scanning Volume Descriptors after we found Terminating Descriptor
Terminating Descriptor is the last descriptor in Volume Descriptor Sequence. After it there can be unrecorded or empty sectors which we do not have to scan. Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Diffstat (limited to 'libblkid')
-rw-r--r--libblkid/src/superblocks/udf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libblkid/src/superblocks/udf.c b/libblkid/src/superblocks/udf.c
index bc7273ca5..7f98a15f8 100644
--- a/libblkid/src/superblocks/udf.c
+++ b/libblkid/src/superblocks/udf.c
@@ -94,6 +94,7 @@ struct volume_descriptor {
#define TAG_ID_PVD 1
#define TAG_ID_AVDP 2
#define TAG_ID_LVD 6
+#define TAG_ID_TD 8
#define TAG_ID_LVID 9
struct volume_structure_descriptor {
@@ -290,6 +291,8 @@ real_blksz:
break;
if (le32_to_cpu(vd->tag.location) != loc + b)
break;
+ if (type == TAG_ID_TD)
+ break;
if (type == TAG_ID_PVD) {
if (!have_volid) {
int enc = udf_cid_to_enc(vd->type.primary.ident.cid);