Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1ILLhP-00008J-GZ for mharc-grub-devel@gnu.org; Wed, 15 Aug 2007 12:26:23 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ILLhN-000078-Eu for grub-devel@gnu.org; Wed, 15 Aug 2007 12:26:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ILLhL-00006b-3q for grub-devel@gnu.org; Wed, 15 Aug 2007 12:26:20 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILLhK-00006X-VS for grub-devel@gnu.org; Wed, 15 Aug 2007 12:26:18 -0400 Received: from py-out-1112.google.com ([64.233.166.181]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ILLhK-0004hD-Mx for grub-devel@gnu.org; Wed, 15 Aug 2007 12:26:18 -0400 Received: by py-out-1112.google.com with SMTP id f31so3976711pyh for ; Wed, 15 Aug 2007 09:26:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=chm/deY6EHDIYbKoLv/dgQk/KHuHQ1pBYiZlKdFRlEpq5KFrmWdghMPq2qU0e17QHFtD8bl5ENKv0CjYyTrrVTkCHfJCf5O49DGYtCy+N1d4Wpf//Q91p0vpSur7+tr+lG/Mj6M+pclB8A0gec8sRP+kHwMIo5Yi8jCEZTRfUEE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=mdGnN6y/WaJOnyNR5asvIhCboylqAraDhUkbtCcZqUcsIgkNCRZc1b+ykNPQg+xYy6hy+o0Y8Hu/D0hFdCgPBkjHtYG83Asy7oR993wi3XIoh4go898WyM2yGxKMwJX0qFE7RKz5xTpwl/FIwv1De1pvuwJDlIVuJsy2trBDXk4= Received: by 10.65.133.8 with SMTP id k8mr1211611qbn.1187195176950; Wed, 15 Aug 2007 09:26:16 -0700 (PDT) Received: by 10.64.48.11 with HTTP; Wed, 15 Aug 2007 09:26:16 -0700 (PDT) Message-ID: Date: Thu, 16 Aug 2007 00:26:16 +0800 From: Bean To: "The development of GRUB 2" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Detected-Kernel: Linux 2.6 (newer, 2) Subject: [PATCH] bug fix for the ntfs driver X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2007 16:26:22 -0000 Hi, This patch fix a bug in the ntfs driver which occurs when accessing certain compressed files. -- Bean 2007-08-16 Bean * fs/ntfs.c (read_block): Bug fix for compressed files. Index: fs/ntfs.c =================================================================== RCS file: /sources/grub/grub2/fs/ntfs.c,v retrieving revision 1.1 diff -u -p -r1.1 ntfs.c --- fs/ntfs.c 3 Aug 2007 07:44:01 -0000 1.1 +++ fs/ntfs.c 15 Aug 2007 16:15:48 -0000 @@ -665,9 +665,6 @@ read_block (struct grub_ntfs_rlst *ctx, 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, 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);