From: Theodore Ts'o Date: Sun, 11 Sep 2016 04:25:48 +0000 (-0400) Subject: libext2fs: fix unaligned, multiblock writes in the unix_io handler X-Git-Tag: 1.43.4~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6cad379eb6c86ca58bf5b83a586577de412a2e6;p=thirdparty%2Fe2fsprogs.git libext2fs: fix unaligned, multiblock writes in the unix_io handler The read-modify-write code for the unaligned fallback code wasn't working for multi-block writes. This was unmasked by FreeBSD 11-rc2, since its malloc() is returning unaligned memory regions for large memory regions. Signed-off-by: Theodore Ts'o --- diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 018d2ca93..eee556651 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c @@ -300,6 +300,7 @@ static errcode_t raw_write_blk(io_channel channel, goto short_write; size -= actual; buf += actual; + location += actual; } return 0;