e2fsprogs/lib
Eric Sandeen df7a86d404 libext2fs: fix write size in ext2fs_mmp_write
Without this change, we will write data past the end of the
mmp buf.  Valgrind catches this:

==6373== Syscall param write(buf) points to unaddressable byte(s)
==6373==    at 0x362260E470: __write_nocancel (in /lib64/libpthread-2.12.2.so)
==6373==    by 0x41CF83: raw_write_blk (unix_io.c:255)
==6373==    by 0x41D2BC: unix_write_blk64 (unix_io.c:757)
==6373==    by 0x41A05D: ext2fs_mmp_write (mmp.c:130)
==6373==    by 0x40B0C9: do_set_mmp_value (set_fields.c:806)
==6373==    by 0x421B61: really_execute_command (execute_cmd.c:108)
==6373==    by 0x421C54: ss_execute_line (execute_cmd.c:234)
==6373==    by 0x403743: main (debugfs.c:2339)
==6373==  Address 0x63f000 is not stack'd, malloc'd or (recently) free'd

and in my testing it led to silent failures while writing the mmp
block in debugfs:

write(3, "xV4\22PMM\342\325V\274N\0\0\0\0host.name."..., 4096) = -1 EFAULT (Bad address)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-11 21:06:04 -05:00
..
blkid Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
e2p ext2fs: add multi-mount protection (INCOMPAT_MMP) 2011-09-25 01:55:23 -04:00
et libcom_err: declare com_err_gettext to be static 2011-10-05 03:03:44 -04:00
ext2fs libext2fs: fix write size in ext2fs_mmp_write 2011-11-11 21:06:04 -05:00
quota libext2fs: ext2fs_[set_]file_acl_block needs to check for 64-bit feature flag 2011-10-16 20:46:49 -04:00
ss Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
uuid Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
Makefile.bsd-lib Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.checker Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.darwin-lib Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.elf-lib Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.library Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.profile Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.solaris-lib Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
config.h.in libquota: clean up some gcc -Wall warnings 2011-10-04 11:37:46 -04:00
dirpaths.h.in Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
fpopen.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00