mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
socket: Check return value to avoid NULL deref
** CID 1551665: Null pointer dereferences (NULL_RETURNS) Thanks coverity. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Eshan Kelkar <eshankelkar@galorithm.com>
This commit is contained in:
committed by
Sahana Prasad
parent
97e9289271
commit
eacab52789
@@ -1083,6 +1083,10 @@ jump_thread_func(void *arg)
|
||||
/* Pop the information about the current jump */
|
||||
jis = ssh_list_pop_head(struct ssh_jump_info_struct *,
|
||||
jump_session->opts.proxy_jumps);
|
||||
if (jis == NULL) {
|
||||
SSH_LOG(SSH_LOG_WARN, "Inconsistent list of proxy jumps received");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ssh_options_set(jump_session, SSH_OPTIONS_HOST, jis->hostname);
|
||||
ssh_options_set(jump_session, SSH_OPTIONS_USER, jis->username);
|
||||
|
||||
Reference in New Issue
Block a user