f2fs: fix leaking uninitialized memory in compressed clusters
authorEric Biggers <ebiggers@google.com>
Fri, 21 Feb 2020 04:50:37 +0000 (20:50 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 27 Feb 2020 18:16:44 +0000 (10:16 -0800)
commit7fa6d59816e7d81cfd4f854468c477c12b85c789
tree31938ca686decc2e92863a1002b7f19d10f9d8f6
parentbf22c3cc8ce71454dddd772284773306a68031d8
f2fs: fix leaking uninitialized memory in compressed clusters

When the compressed data of a cluster doesn't end on a page boundary,
the remainder of the last page must be zeroed in order to avoid leaking
uninitialized memory to disk.

Fixes: 4c8ff7095bef ("f2fs: support data compression")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/compress.c