From: Alex Bligh Date: Sat, 28 May 2011 18:53:44 +0000 (+0100) Subject: Fix oversize writes to write to correct area of disk X-Git-Url: http://git.alex.org.uk Fix oversize writes to write to correct area of disk Oversize writes were not incrementing the seek location for writes. This could cause disk corruption. --- diff --git a/nbd-server.c b/nbd-server.c index d57120b..41b847a 100644 --- a/nbd-server.c +++ b/nbd-server.c @@ -1576,6 +1576,7 @@ int mainloop(CLIENT *client) { continue; } len -= currlen; + request.from += currlen; currlen = (len < BUFSIZE) ? len : BUFSIZE; } SEND(client->net, reply);