diff --git a/plugins/ssh-base/sshd.c b/plugins/ssh-base/sshd.c index 797b7337c..e532a3688 100644 --- a/plugins/ssh-base/sshd.c +++ b/plugins/ssh-base/sshd.c @@ -1,7 +1,7 @@ /* * libwebsockets - lws-plugin-ssh-base - sshd.c * - * Copyright (C) 2017 Andy Green + * Copyright (C) 2017 - 2018 Andy Green * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1114,6 +1114,7 @@ again: case SSHS_NVC_DO_UAR_PUBKEY_BLOB: pss->ua->pubkey = pss->last_alloc; + pss->last_alloc = NULL; pss->ua->pubkey_len = pss->npos; /* * RFC4253 @@ -1171,6 +1172,7 @@ again: } lwsl_info("SSHS_DO_UAR_SIG\n"); pss->ua->sig = pss->last_alloc; + pss->last_alloc = NULL; pss->ua->sig_len = pss->npos; pss->parser_state = SSHS_MSG_EAT_PADDING; diff --git a/test-apps/test-sshd.c b/test-apps/test-sshd.c index 15984537c..2a5dada6d 100644 --- a/test-apps/test-sshd.c +++ b/test-apps/test-sshd.c @@ -343,7 +343,7 @@ ssh_ops_is_pubkey_authorized(const char *username, const char *type, */ if (memcmp(peer, ps, peer_len)) { - lwsl_notice("factors mismatch\n"); + lwsl_info("factors mismatch\n"); goto bail; }