summaryrefslogtreecommitdiffstats
path: root/fs/ntfs/runlist.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-09-08 17:52:31 +0200
committerAnton Altaparmakov <aia21@cantab.net>2005-09-08 17:52:31 +0200
commit2b0ada2b8e086c267dd116a39ad41ff0a717b665 (patch)
tree37bf95af38d5a829edb322663d26df69a1287b94 /fs/ntfs/runlist.c
parentNTFS: Remove two bogus BUG_ON()s from fs/ntfs/mft.c. (diff)
downloadlinux-2b0ada2b8e086c267dd116a39ad41ff0a717b665.tar.xz
linux-2b0ada2b8e086c267dd116a39ad41ff0a717b665.zip
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/runlist.c')
-rw-r--r--fs/ntfs/runlist.c3
1 files changed, 3 insertions, 0 deletions
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,
ntfs_error(vol->sb, "Corrupt attribute.");
return ERR_PTR(-EIO);
}
+ /* If the mapping pairs array is valid but empty, nothing to do. */
+ if (!vcn && !*buf)
+ return old_rl;
/* Current position in runlist array. */
rlpos = 0;
/* Allocate first page and set current runlist size to one page. */