git.samba.org
/
cs
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
037e8e4
)
ctdbd_conn: don't use uninitialized memory in ctdbd_register_ips()
author
Stefan Metzmacher
<metze@samba.org>
Thu, 16 Nov 2023 12:29:18 +0000
(13:29 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 15 Dec 2023 11:06:34 +0000
(11:06 +0000)
We dump the structure into the socket, so we need to zero the content
including possible padding.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15523
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
source3/lib/ctdbd_conn.c
patch
|
blob
|
history
diff --git
a/source3/lib/ctdbd_conn.c
b/source3/lib/ctdbd_conn.c
index dd9206b00fd9c37f69ff6c566be95a418aef482c..4382bae54fcfff482b35d0c40c5c3ebf0a8d57c7 100644
(file)
--- a/
source3/lib/ctdbd_conn.c
+++ b/
source3/lib/ctdbd_conn.c
@@
-1144,6
+1144,7
@@
int ctdbd_register_ips(struct ctdbd_connection *conn,
smbd_ctdb_canonicalize_ip(_client, &client);
smbd_ctdb_canonicalize_ip(_server, &server);
+ ZERO_STRUCT(p);
switch (client.ss_family) {
case AF_INET:
memcpy(&p.dst.ip, &server, sizeof(p.dst.ip));