Skip to content

Commit

Permalink
Merge pull request #164 from ejohnstown/auth-fix
Browse files Browse the repository at this point in the history
Auth Fix
  • Loading branch information
JacobBarthelmeh authored Apr 26, 2019
2 parents e004dfa + cd05289 commit 8a3c94a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -6700,6 +6700,7 @@ int SendUserAuthRequest(WOLFSSH* ssh, byte authId)
ret = WS_BAD_ARGUMENT;

if (ret == WS_SUCCESS) {
WMEMSET(&authData, 0, sizeof(WS_UserAuthData));
if (authId == ID_USERAUTH_PASSWORD && ssh->ctx->userAuthCb != NULL) {
WLOG(WS_LOG_DEBUG, "SUARPW: Calling the userauth callback");
ret = ssh->ctx->userAuthCb(WOLFSSH_USERAUTH_PASSWORD,
Expand Down Expand Up @@ -6768,6 +6769,7 @@ int SendUserAuthRequest(WOLFSSH* ssh, byte authId)
if (ret == WS_SUCCESS)
ret = wolfSSH_SendPacket(ssh);

ForceZero(&authData, sizeof(WS_UserAuthData));
WLOG(WS_LOG_DEBUG, "Leaving SendUserAuthRequest(), ret = %d", ret);
return ret;
}
Expand Down

0 comments on commit 8a3c94a

Please sign in to comment.