Whamcloud - gitweb
libext2fs: zero the EA block buffer before filling it
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 4 Nov 2014 16:47:30 +0000 (11:47 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 4 Nov 2014 16:47:30 +0000 (11:47 -0500)
commitbab25cb7a7e2b042926748a96cadc386e3de6c6a
tree29190e2986e8d96380b48164ec6465fabc2f8ae6
parentdfa667dab663b0fb24cbd20e8374023a923db1a6
libext2fs: zero the EA block buffer before filling it

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>
lib/ext2fs/ext_attr.c