summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2017-09-19 14:54:26 +1000
committerMartin Schwenke <martins@samba.org>2017-09-19 13:30:26 +0200
commit3816270c76d2aab275dc92d319a1b1708c026b8b (patch)
tree27eadd0026e1c831de7db85eab1611763066fd5b /ctdb
parent3783b66fb343b9dbbb4a135ff0573c80ef2aba17 (diff)
downloadsamba-3816270c76d2aab275dc92d319a1b1708c026b8b.tar.gz
ctdb-common: Initialise socket addresses before reading into them
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/common/system_aix.c3
-rw-r--r--ctdb/common/system_freebsd.c3
-rw-r--r--ctdb/common/system_gnu.c3
-rw-r--r--ctdb/common/system_kfreebsd.c3
-rw-r--r--ctdb/common/system_linux.c3
5 files changed, 15 insertions, 0 deletions
diff --git a/ctdb/common/system_aix.c b/ctdb/common/system_aix.c
index e44d1d6a031..f0a0a62efc0 100644
--- a/ctdb/common/system_aix.c
+++ b/ctdb/common/system_aix.c
@@ -291,6 +291,9 @@ int ctdb_sys_read_tcp_packet(int s, void *private_data,
return -1;
}
+ ZERO_STRUCTP(src);
+ ZERO_STRUCTP(dst);
+
/* Ethernet */
eth = (struct ether_header *)buffer;
diff --git a/ctdb/common/system_freebsd.c b/ctdb/common/system_freebsd.c
index e72fbbd28ca..b709a5c75c1 100644
--- a/ctdb/common/system_freebsd.c
+++ b/ctdb/common/system_freebsd.c
@@ -298,6 +298,9 @@ int ctdb_sys_read_tcp_packet(int s, void *private_data,
return -1;
}
+ ZERO_STRUCTP(src);
+ ZERO_STRUCTP(dst);
+
/* Ethernet */
eth = (struct ether_header *)pkt;
diff --git a/ctdb/common/system_gnu.c b/ctdb/common/system_gnu.c
index 603345d0755..38ccd13988b 100644
--- a/ctdb/common/system_gnu.c
+++ b/ctdb/common/system_gnu.c
@@ -293,6 +293,9 @@ int ctdb_sys_read_tcp_packet(int s, void *private_data,
return -1;
}
+ ZERO_STRUCTP(src);
+ ZERO_STRUCTP(dst);
+
/* Ethernet */
eth = (struct ether_header *)pkt;
diff --git a/ctdb/common/system_kfreebsd.c b/ctdb/common/system_kfreebsd.c
index 7e33990b615..d02f28659cb 100644
--- a/ctdb/common/system_kfreebsd.c
+++ b/ctdb/common/system_kfreebsd.c
@@ -293,6 +293,9 @@ int ctdb_sys_read_tcp_packet(int s, void *private_data,
return -1;
}
+ ZERO_STRUCTP(src);
+ ZERO_STRUCTP(dst);
+
/* Ethernet */
eth = (struct ether_header *)pkt;
diff --git a/ctdb/common/system_linux.c b/ctdb/common/system_linux.c
index 3647de9be7c..fa77a45460f 100644
--- a/ctdb/common/system_linux.c
+++ b/ctdb/common/system_linux.c
@@ -518,6 +518,9 @@ int ctdb_sys_read_tcp_packet(int s, void *private_data,
return -1;
}
+ ZERO_STRUCTP(src);
+ ZERO_STRUCTP(dst);
+
/* Ethernet */
eth = (struct ether_header *)pkt;