diff options
author | Paulo Alcantara <pcacjr@gmail.com> | 2012-02-11 23:14:54 -0300 |
---|---|---|
committer | Paulo Alcantara <pcacjr@gmail.com> | 2012-02-11 23:14:54 -0300 |
commit | b6a5884738450626ee1a9ab63e0710de7c879b75 (patch) | |
tree | a67484d73a2591e2e51c22fb8afa4ba22b17418c | |
parent | 83a76e01ba0172202adf0a0ebdac0fd9710ccae5 (diff) | |
download | syslinux-b6a5884738450626ee1a9ab63e0710de7c879b75.tar.gz syslinux-b6a5884738450626ee1a9ab63e0710de7c879b75.tar.xz syslinux-b6a5884738450626ee1a9ab63e0710de7c879b75.zip |
ntfs: check for index entry which has INDEX_ENTRY_END flag set
In ntfs_readdir(), if one entry has INDEX_ENTRY_END flag set, it won't
contain indexed_file member, that'd be used afterwards when looking for
the MFT record that is associated with that index entry.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
-rw-r--r-- | core/fs/ntfs/ntfs.c | 10 | ||||
-rw-r--r-- | core/fs/ntfs/ntfs.h | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/core/fs/ntfs/ntfs.c b/core/fs/ntfs/ntfs.c index 0f6cc445..500d0fd3 100644 --- a/core/fs/ntfs/ntfs.c +++ b/core/fs/ntfs/ntfs.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Paulo Alcantara <pcacjr@gmail.com> + * Copyright (C) 2011-2012 Paulo Alcantara <pcacjr@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1181,6 +1181,14 @@ idx_block_next_entry: } readdir_state->entries_count++; + + /* Need to check if this entry has INDEX_ENTRY_END flag set. If + * so, then it won't contain a indexed_file file, so continue the + * lookup on the next VCN/LCN (if any). + */ + if (ie->flags & INDEX_ENTRY_END) + goto next_vcn; + len = ntfs_cvt_filename(filename, ie); if (!is_filename_printable(filename)) goto idx_block_next_entry; diff --git a/core/fs/ntfs/ntfs.h b/core/fs/ntfs/ntfs.h index c6aa0745..721a78d7 100644 --- a/core/fs/ntfs/ntfs.h +++ b/core/fs/ntfs/ntfs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Paulo Alcantara <pcacjr@gmail.com> + * Copyright (C) 2011-2012 Paulo Alcantara <pcacjr@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by |