Skip to content

Commit a473a05

Browse files
authored
Merge pull request #854 from miyazakh/fix_uninitialized_var
fix uninitialized authData
2 parents b2c683d + c1cfad7 commit a473a05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15043,6 +15043,7 @@ int SendUserAuthRequest(WOLFSSH* ssh, byte authType, int addSig)
1504315043
ret = WS_MEMORY_E;
1504415044
}
1504515045

15046+
WMEMSET(&authData, 0, sizeof(authData));
1504615047
if (ret == WS_SUCCESS) {
1504715048
WMEMSET(keySig_ptr, 0, sizeof(WS_KeySignature));
1504815049
keySig_ptr->keySigId = ID_NONE;
@@ -15058,7 +15059,6 @@ int SendUserAuthRequest(WOLFSSH* ssh, byte authType, int addSig)
1505815059
if (ssh->ctx->userAuthCb != NULL) {
1505915060
WLOG(WS_LOG_DEBUG, "SUAR: Calling the userauth callback");
1506015061

15061-
WMEMSET(&authData, 0, sizeof(authData));
1506215062
authData.type = authType;
1506315063
authData.username = (const byte*)ssh->userName;
1506415064
authData.usernameSz = ssh->userNameSz;

0 commit comments

Comments
 (0)