diff options
author | Karel Zak | 2013-02-14 13:56:34 +0100 |
---|---|---|
committer | Karel Zak | 2013-02-14 13:56:34 +0100 |
commit | 4127f053ba482b0bd4d6976d4ca90bf77e827461 (patch) | |
tree | eea0be98e19bc65bc18047c17c1a3e5b83f7f910 /libblkid | |
parent | libblkid: Probe UDF volumes for ISO9660 info as well (diff) | |
download | kernel-qcow2-util-linux-4127f053ba482b0bd4d6976d4ca90bf77e827461.tar.gz kernel-qcow2-util-linux-4127f053ba482b0bd4d6976d4ca90bf77e827461.tar.xz kernel-qcow2-util-linux-4127f053ba482b0bd4d6976d4ca90bf77e827461.zip |
libblkid: read whole buffer for iso_volume_descriptor
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid')
-rw-r--r-- | libblkid/src/superblocks/iso9660.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c index c553012de..148587b3b 100644 --- a/libblkid/src/superblocks/iso9660.c +++ b/libblkid/src/superblocks/iso9660.c @@ -204,7 +204,8 @@ int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) struct boot_record *boot= (struct boot_record *) blkid_probe_get_buffer(pr, off, - sizeof(struct boot_record)); + max(sizeof(struct boot_record), + sizeof(struct iso_volume_descriptor))); if (boot == NULL || boot->vd_type == ISO_VD_END) break; @@ -225,7 +226,7 @@ int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) if (iso->vd_type != ISO_VD_SUPPLEMENTARY) { off += ISO_SECTOR_SIZE; continue; - } + } if (memcmp(iso->escape_sequences, "%/@", 3) == 0 || memcmp(iso->escape_sequences, "%/C", 3) == 0 || |