aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/ggate
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2018-12-04 15:25:15 +0000
committerEd Maste <emaste@FreeBSD.org>2018-12-04 15:25:15 +0000
commit133f9fcfff9b61f799ae24f170f45601a2513841 (patch)
treee38453dadcd0f87fc5812efc63631ebfb41f9804 /sbin/ggate
parent0df76496a6e6a62d6e1d6b3dcc371e0254333dad (diff)
downloadsrc-133f9fcfff9b61f799ae24f170f45601a2513841.tar.gz
src-133f9fcfff9b61f799ae24f170f45601a2513841.zip
ggated: do not expose stack data in sendfail()
admbugs: 590 Submitted by: Fabian Keil <fk@fabiankeil.de> Obtained from: ElectroBSD
Notes
Notes: svn path=/head/; revision=341470
Diffstat (limited to 'sbin/ggate')
-rw-r--r--sbin/ggate/ggated/ggated.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/ggate/ggated/ggated.c b/sbin/ggate/ggated/ggated.c
index e52bdd7cdd15..f4279cbfaa13 100644
--- a/sbin/ggate/ggated/ggated.c
+++ b/sbin/ggate/ggated/ggated.c
@@ -591,6 +591,7 @@ sendfail(int sfd, int error, const char *fmt, ...)
va_list ap;
ssize_t data;
+ memset(&sinit, 0, sizeof(sinit));
sinit.gs_error = error;
g_gate_swap2n_sinit(&sinit);
data = g_gate_send(sfd, &sinit, sizeof(sinit), 0);