summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
authorjsg@openbsd.org <jsg@openbsd.org>2016-01-23 05:31:35 +0000
committerDamien Miller <djm@mindrot.org>2016-01-27 16:54:26 +1100
commit458abc2934e82034c5c281336d8dc0f910aecad3 (patch)
tree7006b465a47aa27e10178a68653ad8548cd6695a /clientloop.c
parent65a3c0dacbc7dbb75ddb6a70ebe22d8de084d0b0 (diff)
upstream commit
Zero a stack buffer with explicit_bzero() instead of memset() when returning from client_loop() for consistency with buffer_free()/sshbuf_free(). ok dtucker@ deraadt@ djm@ Upstream-ID: bc9975b2095339811c3b954694d7d15ea5c58f66
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clientloop.c b/clientloop.c
index d324e297b..0c77b046c 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.280 2016/01/14 16:17:39 markus Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.281 2016/01/23 05:31:35 jsg Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1787,7 +1787,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1787 } 1787 }
1788 1788
1789 /* Clear and free any buffers. */ 1789 /* Clear and free any buffers. */
1790 memset(buf, 0, sizeof(buf)); 1790 explicit_bzero(buf, sizeof(buf));
1791 buffer_free(&stdin_buffer); 1791 buffer_free(&stdin_buffer);
1792 buffer_free(&stdout_buffer); 1792 buffer_free(&stdout_buffer);
1793 buffer_free(&stderr_buffer); 1793 buffer_free(&stderr_buffer);