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:
parent
2b957bde5a
commit
30abea8815
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user