git.samba.org
/
sharpe
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
324ae75
)
ctdb-protocol: Fix marshalling of TDB_DATA
author
Amitay Isaacs
<amitay@gmail.com>
Thu, 21 Apr 2016 13:56:13 +0000
(23:56 +1000)
committer
Martin Schwenke
<martins@samba.org>
Tue, 3 May 2016 02:43:19 +0000
(
04:43
+0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/protocol/protocol_types.c
patch
|
blob
|
history
diff --git
a/ctdb/protocol/protocol_types.c
b/ctdb/protocol/protocol_types.c
index 868f55ab5567fec4666c8b7714fcba43bfbce4b3..fa11bc2bcc26439d12a128c6f5b9fd255311bee9 100644
(file)
--- a/
ctdb/protocol/protocol_types.c
+++ b/
ctdb/protocol/protocol_types.c
@@
-2340,7
+2340,9
@@
size_t ctdb_tdb_data_len(TDB_DATA data)
void ctdb_tdb_data_push(TDB_DATA data, uint8_t *buf)
{
- memcpy(buf, data.dptr, data.dsize);
+ if (data.dsize > 0) {
+ memcpy(buf, data.dptr, data.dsize);
+ }
}
int ctdb_tdb_data_pull(uint8_t *buf, size_t buflen, TALLOC_CTX *mem_ctx,