1
0
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:
Andreas Schneider
2012-10-08 20:34:19 +02:00
parent 53008fb5d4
commit bcc00eec9b

View File

@ -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]);
}