1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

dbwrap: Fix tdb_data_buf()

IIRC there are platforms that don't like memcpy() with len=0.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2019-05-03 15:42:42 +02:00 committed by Jeremy Allison
parent 2b957bde5a
commit 30abea8815

View File

@ -643,7 +643,7 @@ static ssize_t tdb_data_buf(const TDB_DATA *dbufs, int num_dbufs,
}
needed = tmp;
if (needed <= buflen) {
if ((thislen != 0) && (needed <= buflen)) {
memcpy(p, dbufs[i].dptr, thislen);
p += thislen;
}