e2fsprogs/tests/f_write_ea_no_extra_isize
Darrick J. Wong 366d299fe7 libext2fs: initialize i_extra_isize when writing EAs
If i_extra_isize is zero when we try to write extended attributes,
we'll end up writing the EA magic into the i_extra_isize field, which
causes a subsequent crash on big endian systems (when we try to write
0xEA02 bytes past the inode!).  Therefore when the field is zero, set
i_extra_isize to the desired extra_isize size, zero those bytes, and
write the EAs after the end of the extended inode.

v2: Don't bother if we have 128b inodes, and ensure that the value
is 32b-aligned so that the EA magic starts on a 32b boundary.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-01-27 10:59:19 -05:00
..
expect.1 libext2fs: initialize i_extra_isize when writing EAs 2015-01-27 10:59:19 -05:00
expect.2 libext2fs: initialize i_extra_isize when writing EAs 2015-01-27 10:59:19 -05:00
image.gz libext2fs: initialize i_extra_isize when writing EAs 2015-01-27 10:59:19 -05:00
name libext2fs: initialize i_extra_isize when writing EAs 2015-01-27 10:59:19 -05:00