]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2007-11-10 Bean <bean123ch@gmail.com>
authorrobertmh <robertmh@localhost>
Sat, 10 Nov 2007 20:08:33 +0000 (20:08 +0000)
committerrobertmh <robertmh@localhost>
Sat, 10 Nov 2007 20:08:33 +0000 (20:08 +0000)
* fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.

ChangeLog
fs/ntfs.c

index 2783ed11dfe24204310d3f8a4d077bef06eb7205..e7f888e87d5b320d3987b7c3adb3243083159fd5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-10  Bean  <bean123ch@gmail.com>
+
+       * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
+
 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
 
        * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
index c457fb004528a9ef01ffa995c5520ffaa75f6be7..48571be17f1979016ce968cbbbcaad3d465f9569 100644 (file)
--- a/fs/ntfs.c
+++ b/fs/ntfs.c
@@ -665,9 +665,6 @@ read_block (struct grub_ntfs_rlst *ctx, char *buf, int num)
              if (read_run_list (ctx))
                return grub_errno;
            }
-         if (ctx->target_vcn + 16 < ctx->next_vcn)
-           return grub_error (GRUB_ERR_BAD_FS,
-                              "Compression block should be 16 sector long");
        }
 
       nn = (16 - (ctx->target_vcn & 0xF)) / cpb;
@@ -732,7 +729,9 @@ read_block (struct grub_ntfs_rlst *ctx, char *buf, int num)
              if (buf)
                {
                  if (grub_disk_read
-                     (ctx->comp.disk, ctx->curr_lcn * ctx->comp.spc, 0,
+                     (ctx->comp.disk,
+                      (ctx->target_vcn - ctx->curr_vcn +
+                       ctx->curr_lcn) * ctx->comp.spc, 0,
                       nn * (ctx->comp.spc << BLK_SHR), buf))
                    return grub_errno;
                  buf += nn * (ctx->comp.spc << BLK_SHR);