diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-09-08 11:52:31 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-09-08 11:52:31 -0400 |
commit | 2b0ada2b8e086c267dd116a39ad41ff0a717b665 (patch) | |
tree | 37bf95af38d5a829edb322663d26df69a1287b94 /fs/ntfs | |
parent | 8bb735216a0675e247bbe8b8b92c09d6884d1a17 (diff) |
NTFS: Fix handling of valid but empty mapping pairs array in
fs/ntfs/runlist.c::ntfs_mapping_pairs_decompress().
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs')
-rw-r--r-- | fs/ntfs/ChangeLog | 2 | ||||
-rw-r--r-- | fs/ntfs/runlist.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index f4c27f7c1b6a..8fe38c801166 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog | |||
@@ -46,6 +46,8 @@ ToDo/Notes: | |||
46 | - Fix two nasty runlist merging bugs that had gone unnoticed so far. | 46 | - Fix two nasty runlist merging bugs that had gone unnoticed so far. |
47 | Thanks to Stefano Picerno for the bug report. | 47 | Thanks to Stefano Picerno for the bug report. |
48 | - Remove two bogus BUG_ON()s from fs/ntfs/mft.c. | 48 | - Remove two bogus BUG_ON()s from fs/ntfs/mft.c. |
49 | - Fix handling of valid but empty mapping pairs array in | ||
50 | fs/ntfs/runlist.c::ntfs_mapping_pairs_decompress(). | ||
49 | 51 | ||
50 | 2.1.23 - Implement extension of resident files and make writing safe as well as | 52 | 2.1.23 - Implement extension of resident files and make writing safe as well as |
51 | many bug fixes, cleanups, and enhancements... | 53 | many bug fixes, cleanups, and enhancements... |
diff --git a/fs/ntfs/runlist.c b/fs/ntfs/runlist.c index d26a1be530c5..e4c4716939de 100644 --- a/fs/ntfs/runlist.c +++ b/fs/ntfs/runlist.c | |||
@@ -760,6 +760,9 @@ runlist_element *ntfs_mapping_pairs_decompress(const ntfs_volume *vol, | |||
760 | ntfs_error(vol->sb, "Corrupt attribute."); | 760 | ntfs_error(vol->sb, "Corrupt attribute."); |
761 | return ERR_PTR(-EIO); | 761 | return ERR_PTR(-EIO); |
762 | } | 762 | } |
763 | /* If the mapping pairs array is valid but empty, nothing to do. */ | ||
764 | if (!vcn && !*buf) | ||
765 | return old_rl; | ||
763 | /* Current position in runlist array. */ | 766 | /* Current position in runlist array. */ |
764 | rlpos = 0; | 767 | rlpos = 0; |
765 | /* Allocate first page and set current runlist size to one page. */ | 768 | /* Allocate first page and set current runlist size to one page. */ |