public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: "Zeeshan Ali (Khattak)" <zeeshanak@gnome.org>
To: util-linux@vger.kernel.org
Cc: "Zeeshan Ali (Khattak)" <zeeshanak@gnome.org>
Subject: [PATCH 1/2] libblkid: Don't keep reading same sector of ISO
Date: Mon, 11 Feb 2013 23:22:11 +0200	[thread overview]
Message-ID: <1360617732-4770-1-git-send-email-zeeshanak@gnome.org> (raw)

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


             reply	other threads:[~2013-02-11 21:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-11 21:22 Zeeshan Ali (Khattak) [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360617732-4770-1-git-send-email-zeeshanak@gnome.org \
    --to=zeeshanak@gnome.org \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox