public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] libblkid: Don't keep reading same sector of ISO
@ 2013-02-11 21:22 Zeeshan Ali (Khattak)
  2013-02-11 21:22 ` [PATCH 2/2] libblkid: Expose more ISO9660 headers Zeeshan Ali (Khattak)
  2013-02-14 13:06 ` [PATCH 1/2] libblkid: Don't keep reading same sector of ISO Karel Zak
  0 siblings, 2 replies; 5+ messages in thread
From: Zeeshan Ali (Khattak) @ 2013-02-11 21:22 UTC (permalink / raw)
  To: util-linux; +Cc: Zeeshan Ali (Khattak)

From: "Zeeshan Ali (Khattak)" <zeeshanak@gnome.org>

We were reading the same sector over and over again when parsing ISO9660.
This patches fixes it.
---
 libblkid/src/superblocks/iso9660.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c
index f7d2b76..33a8597 100644
--- a/libblkid/src/superblocks/iso9660.c
+++ b/libblkid/src/superblocks/iso9660.c
@@ -167,8 +167,10 @@ static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag)
 
 		if (iso == NULL || iso->vd_type == ISO_VD_END)
 			break;
-		if (iso->vd_type != ISO_VD_SUPPLEMENTARY)
+		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 ||
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-14 14:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-11 21:22 [PATCH 1/2] libblkid: Don't keep reading same sector of ISO Zeeshan Ali (Khattak)
2013-02-11 21:22 ` [PATCH 2/2] libblkid: Expose more ISO9660 headers Zeeshan Ali (Khattak)
2013-02-14 13:24   ` Karel Zak
2013-02-14 14:04     ` Zeeshan Ali (Khattak)
2013-02-14 13:06 ` [PATCH 1/2] libblkid: Don't keep reading same sector of ISO Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox