mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-16 08:41:51 +03:00
kex: Don't compare an array to null.
Found by Coverity.
This commit is contained in:
@ -338,11 +338,11 @@ void ssh_list_kex(ssh_session session, struct ssh_kex_struct *kex) {
|
||||
#ifdef DEBUG_CRYPTO
|
||||
ssh_print_hexa("session cookie", kex->cookie, 16);
|
||||
#endif
|
||||
if(kex->methods==NULL){
|
||||
ssh_log(session, SSH_LOG_RARE,"kex->methods is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
for(i = 0; i < SSH_KEX_METHODS; i++) {
|
||||
if (kex->methods[i] == NULL) {
|
||||
continue;
|
||||
}
|
||||
ssh_log(session, SSH_LOG_FUNCTIONS, "%s: %s",
|
||||
ssh_kex_nums[i], kex->methods[i]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user