mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 07:44:29 +02:00
upstream: Remove some set but never used variables. ok daraadt@
OpenBSD-Commit-ID: 824baf9c59afc66a4637017e397b9b74a41684e7
This commit is contained in:
parent
156e9e85e9
commit
696fb4298e
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: channels.c,v 1.393 2019/06/28 13:35:04 deraadt Exp $ */
|
/* $OpenBSD: channels.c,v 1.394 2019/07/07 01:05:00 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -3277,7 +3277,6 @@ channel_input_status_confirm(int type, u_int32_t seq, struct ssh *ssh)
|
|||||||
int id = channel_parse_id(ssh, __func__, "status confirm");
|
int id = channel_parse_id(ssh, __func__, "status confirm");
|
||||||
Channel *c;
|
Channel *c;
|
||||||
struct channel_confirm *cc;
|
struct channel_confirm *cc;
|
||||||
int r;
|
|
||||||
|
|
||||||
/* Reset keepalive timeout */
|
/* Reset keepalive timeout */
|
||||||
ssh_packet_set_alive_timeouts(ssh, 0);
|
ssh_packet_set_alive_timeouts(ssh, 0);
|
||||||
@ -3290,7 +3289,7 @@ channel_input_status_confirm(int type, u_int32_t seq, struct ssh *ssh)
|
|||||||
}
|
}
|
||||||
if (channel_proxy_upstream(c, type, seq, ssh))
|
if (channel_proxy_upstream(c, type, seq, ssh))
|
||||||
return 0;
|
return 0;
|
||||||
if ((r = sshpkt_get_end(ssh)) != 0)
|
if (sshpkt_get_end(ssh) != 0)
|
||||||
ssh_packet_disconnect(ssh, "Invalid status confirm message");
|
ssh_packet_disconnect(ssh, "Invalid status confirm message");
|
||||||
if ((cc = TAILQ_FIRST(&c->status_confirms)) == NULL)
|
if ((cc = TAILQ_FIRST(&c->status_confirms)) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: hostfile.c,v 1.75 2019/06/28 01:23:50 deraadt Exp $ */
|
/* $OpenBSD: hostfile.c,v 1.76 2019/07/07 01:05:00 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -163,13 +163,12 @@ int
|
|||||||
hostfile_read_key(char **cpp, u_int *bitsp, struct sshkey *ret)
|
hostfile_read_key(char **cpp, u_int *bitsp, struct sshkey *ret)
|
||||||
{
|
{
|
||||||
char *cp;
|
char *cp;
|
||||||
int r;
|
|
||||||
|
|
||||||
/* Skip leading whitespace. */
|
/* Skip leading whitespace. */
|
||||||
for (cp = *cpp; *cp == ' ' || *cp == '\t'; cp++)
|
for (cp = *cpp; *cp == ' ' || *cp == '\t'; cp++)
|
||||||
;
|
;
|
||||||
|
|
||||||
if ((r = sshkey_read(ret, &cp)) != 0)
|
if (sshkey_read(ret, &cp) != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Skip trailing whitespace. */
|
/* Skip trailing whitespace. */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: sshbuf-misc.c,v 1.6 2016/05/02 08:49:03 djm Exp $ */
|
/* $OpenBSD: sshbuf-misc.c,v 1.7 2019/07/07 01:05:00 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011 Damien Miller
|
* Copyright (c) 2011 Damien Miller
|
||||||
*
|
*
|
||||||
@ -95,14 +95,13 @@ sshbuf_dtob64(struct sshbuf *buf)
|
|||||||
size_t len = sshbuf_len(buf), plen;
|
size_t len = sshbuf_len(buf), plen;
|
||||||
const u_char *p = sshbuf_ptr(buf);
|
const u_char *p = sshbuf_ptr(buf);
|
||||||
char *ret;
|
char *ret;
|
||||||
int r;
|
|
||||||
|
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return strdup("");
|
return strdup("");
|
||||||
plen = ((len + 2) / 3) * 4 + 1;
|
plen = ((len + 2) / 3) * 4 + 1;
|
||||||
if (SIZE_MAX / 2 <= len || (ret = malloc(plen)) == NULL)
|
if (SIZE_MAX / 2 <= len || (ret = malloc(plen)) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
if ((r = b64_ntop(p, len, ret, plen)) == -1) {
|
if (b64_ntop(p, len, ret, plen) == -1) {
|
||||||
explicit_bzero(ret, plen);
|
explicit_bzero(ret, plen);
|
||||||
free(ret);
|
free(ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: sshconnect2.c,v 1.306 2019/06/28 13:35:04 deraadt Exp $ */
|
/* $OpenBSD: sshconnect2.c,v 1.307 2019/07/07 01:05:00 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
||||||
* Copyright (c) 2008 Damien Miller. All rights reserved.
|
* Copyright (c) 2008 Damien Miller. All rights reserved.
|
||||||
@ -570,14 +570,13 @@ input_userauth_failure(int type, u_int32_t seq, struct ssh *ssh)
|
|||||||
Authctxt *authctxt = ssh->authctxt;
|
Authctxt *authctxt = ssh->authctxt;
|
||||||
char *authlist = NULL;
|
char *authlist = NULL;
|
||||||
u_char partial;
|
u_char partial;
|
||||||
int r;
|
|
||||||
|
|
||||||
if (authctxt == NULL)
|
if (authctxt == NULL)
|
||||||
fatal("input_userauth_failure: no authentication context");
|
fatal("input_userauth_failure: no authentication context");
|
||||||
|
|
||||||
if ((r = sshpkt_get_cstring(ssh, &authlist, NULL)) != 0 ||
|
if (sshpkt_get_cstring(ssh, &authlist, NULL) != 0 ||
|
||||||
(r = sshpkt_get_u8(ssh, &partial)) != 0 ||
|
sshpkt_get_u8(ssh, &partial) != 0 ||
|
||||||
(r = sshpkt_get_end(ssh)) != 0)
|
sshpkt_get_end(ssh) != 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (partial != 0) {
|
if (partial != 0) {
|
||||||
|
6
sshkey.c
6
sshkey.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: sshkey.c,v 1.78 2019/06/27 06:29:35 djm Exp $ */
|
/* $OpenBSD: sshkey.c,v 1.79 2019/07/07 01:05:00 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||||
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
|
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
|
||||||
@ -950,7 +950,6 @@ fingerprint_b64(const char *alg, u_char *dgst_raw, size_t dgst_raw_len)
|
|||||||
char *ret;
|
char *ret;
|
||||||
size_t plen = strlen(alg) + 1;
|
size_t plen = strlen(alg) + 1;
|
||||||
size_t rlen = ((dgst_raw_len + 2) / 3) * 4 + plen + 1;
|
size_t rlen = ((dgst_raw_len + 2) / 3) * 4 + plen + 1;
|
||||||
int r;
|
|
||||||
|
|
||||||
if (dgst_raw_len > 65536 || (ret = calloc(1, rlen)) == NULL)
|
if (dgst_raw_len > 65536 || (ret = calloc(1, rlen)) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -958,8 +957,7 @@ fingerprint_b64(const char *alg, u_char *dgst_raw, size_t dgst_raw_len)
|
|||||||
strlcat(ret, ":", rlen);
|
strlcat(ret, ":", rlen);
|
||||||
if (dgst_raw_len == 0)
|
if (dgst_raw_len == 0)
|
||||||
return ret;
|
return ret;
|
||||||
if ((r = b64_ntop(dgst_raw, dgst_raw_len,
|
if (b64_ntop(dgst_raw, dgst_raw_len, ret + plen, rlen - plen) == -1) {
|
||||||
ret + plen, rlen - plen)) == -1) {
|
|
||||||
freezero(ret, rlen);
|
freezero(ret, rlen);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user