grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] exfat: Read the contiguous flag from the correct extension


From: Carlo Caione
Subject: [PATCH] exfat: Read the contiguous flag from the correct extension
Date: Wed, 19 Oct 2016 17:20:02 +0200

From: Carlo Caione <address@hidden>

dir.is_contiguous flag is being set reading into the wrong struct.
This is causing a fragmented file not to be readable from an exfat
partition since the NoFatChain bit is wrong. Fix this.

Signed-off-by: Carlo Caione <address@hidden>
---
 grub-core/fs/fat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/fs/fat.c b/grub-core/fs/fat.c
index d5212c2..dd8850a 100644
--- a/grub-core/fs/fat.c
+++ b/grub-core/fs/fat.c
@@ -684,7 +684,7 @@ grub_fat_iterate_dir_next (grub_disk_t disk, struct 
grub_fat_data *data,
                  ctxt->dir.file_size
                    = grub_cpu_to_le64 
(sec.type_specific.stream_extension.file_size);
                  ctxt->dir.have_stream = 1;
-                 ctxt->dir.is_contiguous = 
!!(dir.type_specific.stream_extension.flags
+                 ctxt->dir.is_contiguous = 
!!(sec.type_specific.stream_extension.flags
                                               & grub_cpu_to_le16_compile_time 
(FLAG_CONTIGUOUS));
                  break;
                case 0xc1:
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]