ctdb: buffer write beyond limits
authorSwen Schillig <swen@linux.ibm.com>
Fri, 15 Feb 2019 13:34:05 +0000 (14:34 +0100)
committerMartin Schwenke <martins@samba.org>
Fri, 22 Feb 2019 01:08:07 +0000 (02:08 +0100)
commitfa8e69ac9538980c441b7fbefe0979027ecc8eac
tree228d14e7aade74d9d6040c0519e19f47509deea2
parentcbf23f2b0fbc7705f6050ddc8b0b925132c4a290
ctdb: buffer write beyond limits

In order to calculate the number of bytes correctly which
are to be read into the buffer, the buffer.offset must be taken
into account.

This patch fixes a regression introduced by 382705f495dd.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13791

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/common/ctdb_io.c