Mailing List Archive

[PATCH] Remove `buf' in client_loop().
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>

The last user of `buf' was removed in commit
cecee2d607099 ("upstream: client: switch to sshbuf API; ok djm@")

Remove `buf' in client_loop().

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
clientloop.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/clientloop.c b/clientloop.c
index 7a62af9db4907..44bc99859655a 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1249,7 +1249,6 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
int r, max_fd = 0, max_fd2 = 0, len;
u_int64_t ibytes, obytes;
u_int nalloc = 0;
- char buf[100];

debug("Entering interactive session.");

@@ -1477,8 +1476,6 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
fatal("%s: buffer error: %s", __func__, ssh_err(r));
}

- /* Clear and free any buffers. */
- explicit_bzero(buf, sizeof(buf));
sshbuf_free(stderr_buffer);

/* Report bytes transferred, and transfer rates. */
--
2.28.0


_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: [PATCH] Remove `buf' in client_loop(). [ In reply to ]
Applied, thanks.

On Wed, 16 Sep 2020 at 06:05, Sebastian Andrzej Siewior
<openssh@ml.breakpoint.cc> wrote:
>
> From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
>
> The last user of `buf' was removed in commit
> cecee2d607099 ("upstream: client: switch to sshbuf API; ok djm@")
>
> Remove `buf' in client_loop().
>
> Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
> ---
> clientloop.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/clientloop.c b/clientloop.c
> index 7a62af9db4907..44bc99859655a 100644
> --- a/clientloop.c
> +++ b/clientloop.c
> @@ -1249,7 +1249,6 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
> int r, max_fd = 0, max_fd2 = 0, len;
> u_int64_t ibytes, obytes;
> u_int nalloc = 0;
> - char buf[100];
>
> debug("Entering interactive session.");
>
> @@ -1477,8 +1476,6 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
> fatal("%s: buffer error: %s", __func__, ssh_err(r));
> }
>
> - /* Clear and free any buffers. */
> - explicit_bzero(buf, sizeof(buf));
> sshbuf_free(stderr_buffer);
>
> /* Report bytes transferred, and transfer rates. */
> --
> 2.28.0
>
>
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev@mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



--
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new)
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev