f2fs-tools: ensure that unused xattr space is zeroized
Make fsck.f2fs zeroize the unused xattr space, i.e. the space after the
end of the zero-terminated xattr list, if it isn't already zeroized.
This is important because the kernel currently does not explicitly
zero-terminate the list when writing xattrs. So, the kernel relies on
the unused space containing zeroes.
Also, add a missing free() to fix a memory leak.
Change-Id: I4b3216dfbd1bfade2536df7a92f47589ef2a31aa
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit d860afaebd1e04839047d247fa5d1cfcdeaeefb6)
1 file changed