1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-12 15:41:16 +03:00

Add ssh_set_error_invalid in ssh_options_set().

Add ssh_set_error_invalid in ssh_options_set with case SSH_OPTIONS_HOST after ssh_config_parse_uri returns error.

Signed-off-by: Wenjie Yang <yangw.ing@foxmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Feynman-young
2024-04-11 13:03:17 +08:00
committed by Jakub Jelen
parent 46a28cfc49
commit 3577eea324

View File

@@ -637,6 +637,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
char *username = NULL, *hostname = NULL;
rc = ssh_config_parse_uri(value, &username, &hostname, NULL, true);
if (rc != SSH_OK) {
ssh_set_error_invalid(session);
return -1;
}
if (username != NULL) {