diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-04 17:15:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-04 17:15:03 +0200 |
commit | 7813029a509c0c92a5b16d846defaa50a2d3d7f1 (patch) | |
tree | 1962ab81537b7155d185f4b0b06c0323ff4dc509 /fs/nilfs2 | |
parent | Merge tag 'iio-for-4.8b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic... (diff) | |
parent | Linux 4.7-rc6 (diff) | |
download | linux-7813029a509c0c92a5b16d846defaa50a2d3d7f1.tar.xz linux-7813029a509c0c92a5b16d846defaa50a2d3d7f1.zip |
Merge 4.7-rc6 into staging-next
We want the staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nilfs2')
-rw-r--r-- | fs/nilfs2/the_nilfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c index 809bd2de7ad0..e9fd241b9a0a 100644 --- a/fs/nilfs2/the_nilfs.c +++ b/fs/nilfs2/the_nilfs.c @@ -439,7 +439,7 @@ static int nilfs_valid_sb(struct nilfs_super_block *sbp) if (!sbp || le16_to_cpu(sbp->s_magic) != NILFS_SUPER_MAGIC) return 0; bytes = le16_to_cpu(sbp->s_bytes); - if (bytes > BLOCK_SIZE) + if (bytes < sumoff + 4 || bytes > BLOCK_SIZE) return 0; crc = crc32_le(le32_to_cpu(sbp->s_crc_seed), (unsigned char *)sbp, sumoff); |