When writing an extended attribute (EA) block, it's quite possible
that the EA formatting code will not write the entire buffer.
Therefore, we must zero the buffer beforehand to avoid writing random
heap contents to disk.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: Sami Liedes <sami.liedes@iki.fi>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
write_ea_block:
/* Write the EA block */
- err = ext2fs_get_mem(handle->fs->blocksize, &block_buf);
+ err = ext2fs_get_memzero(handle->fs->blocksize, &block_buf);
if (err)
goto out;