Skip to content

Commit

Permalink
Fix uninitialized variable causing random authentication failures
Browse files Browse the repository at this point in the history
  • Loading branch information
slcasner committed Jul 31, 2019
1 parent ec54228 commit 56116fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vehicle/OVMS.V3/components/console_ssh/src/console_ssh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ int OvmsSSH::Authenticate(uint8_t type, const WS_UserAuthData* data, void* ctx)
if (key.empty())
return WOLFSSH_USERAUTH_INVALID_USER;
byte der[560];
uint32_t len;
uint32_t len = sizeof(der);
if (Base64_Decode((const byte*)key.data(), key.size(), der, &len) != 0 ||
len != data->sf.publicKey.publicKeySz ||
memcmp(data->sf.publicKey.publicKey, der, len) != 0)
Expand Down

0 comments on commit 56116fe

Please sign in to comment.