]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: read whole buffer for iso_volume_descriptor
authorKarel Zak <kzak@redhat.com>
Thu, 14 Feb 2013 12:56:34 +0000 (13:56 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Feb 2013 12:56:34 +0000 (13:56 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/superblocks/iso9660.c

index c553012dec1306628443697d960213544b656c3e..148587b3b0f593550f52dde4a8c1ea8c642378f3 100644 (file)
@@ -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 ||