Whamcloud - gitweb
libext2fs: write only core inode in update_path()
authorEric Sandeen <sandeen@redhat.com>
Wed, 17 Jun 2009 22:49:01 +0000 (18:49 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 17 Jun 2009 22:49:01 +0000 (18:49 -0400)
commit125a36780626cdb0fc4d62fd529486baa8bce54c
treef7825aaaf3a052c000cef3c221d22c6ce13b89ba
parent1acde2b2776fca4d9386a04909296c2e6b11f242
libext2fs: write only core inode in update_path()

The ext2_extent_handle only has a struct ext2_inode allocated on
it, and the same amount copied into it in that same function,
but in update_path() we're possibly writing out more than that -
for example 256 bytes, from that address.  This causes uninitialized
memory to get  written to disk, overwriting the parts of the
inode past the osd2 member (the end of the smaller structure).

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/extent.c