mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
options: Check return code of ssh_iterator_value.
Found by Coverity.
This commit is contained in:
@@ -882,7 +882,11 @@ int ssh_options_get(ssh_session session, enum ssh_options_e type, char** value)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SSH_OPTIONS_IDENTITY: {
|
case SSH_OPTIONS_IDENTITY: {
|
||||||
src = ssh_iterator_value(char *, ssh_list_get_iterator(session->opts.identity));
|
struct ssh_iterator *it = ssh_list_get_iterator(session->opts.identity);
|
||||||
|
if (it == NULL) {
|
||||||
|
return SSH_ERROR;
|
||||||
|
}
|
||||||
|
src = ssh_iterator_value(char *, it);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user