From d6cad379eb6c86ca58bf5b83a586577de412a2e6 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 11 Sep 2016 00:25:48 -0400 Subject: [PATCH] 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 --- lib/ext2fs/unix_io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 018d2ca..eee5566 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; -- 1.8.3.1