summaryrefslogtreecommitdiff
path: root/ctdb/server/ctdb_monitor.c
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2016-01-11 17:23:12 +1100
committerMichael Adam <obnox@samba.org>2016-01-12 19:16:17 +0100
commit56ce230de72dbf14ccddb3f7b26b8b7f16986dfc (patch)
tree6a548709b381574a76a48360161a799751b63c5f /ctdb/server/ctdb_monitor.c
parent8f73ae03cc50f26e85b78e35bf22e40eb1ff7684 (diff)
downloadsamba-56ce230de72dbf14ccddb3f7b26b8b7f16986dfc.tar.gz
ctdb-recoverd: Fix some uninitialised memory issues
The first element of these structures is a 32-bit PNN. On 64-bit systems this field can be followed by 32-bits of padding. When the structures are copied this can cause uninitialised memory to be copied. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'ctdb/server/ctdb_monitor.c')
-rw-r--r--ctdb/server/ctdb_monitor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_monitor.c b/ctdb/server/ctdb_monitor.c
index d8eda2a11ca..0a8273a9217 100644
--- a/ctdb/server/ctdb_monitor.c
+++ b/ctdb/server/ctdb_monitor.c
@@ -134,6 +134,7 @@ static void ctdb_health_callback(struct ctdb_context *ctdb, int status, void *p)
c.pnn = ctdb->pnn;
c.old_flags = node->flags;
+ ZERO_STRUCT(rd);
rd.pnn = ctdb->pnn;
rd.srvid = CTDB_SRVID_TAKEOVER_RUN_RESPONSE;