Merge pull request #854 from miyazakh/fix_uninitialized_var

fix uninitialized authData
pull/853/head
David Garske 2025-12-08 07:52:13 -08:00 committed by GitHub
commit a473a05e42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -15043,6 +15043,7 @@ int SendUserAuthRequest(WOLFSSH* ssh, byte authType, int addSig)
ret = WS_MEMORY_E;
}
WMEMSET(&authData, 0, sizeof(authData));
if (ret == WS_SUCCESS) {
WMEMSET(keySig_ptr, 0, sizeof(WS_KeySignature));
keySig_ptr->keySigId = ID_NONE;
@ -15058,7 +15059,6 @@ int SendUserAuthRequest(WOLFSSH* ssh, byte authType, int addSig)
if (ssh->ctx->userAuthCb != NULL) {
WLOG(WS_LOG_DEBUG, "SUAR: Calling the userauth callback");
WMEMSET(&authData, 0, sizeof(authData));
authData.type = authType;
authData.username = (const byte*)ssh->userName;
authData.usernameSz = ssh->userNameSz;