1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

options: Parse hostname by last '@'

The login name can have '@' char in it

Signed-off-by: Norbert Pocs <npocs@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Norbert Pocs
2022-07-04 13:58:06 +02:00
committed by Andreas Schneider
parent e53a2711d3
commit bb5f7e2707

View File

@@ -513,7 +513,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
ssh_set_error_oom(session);
return -1;
}
p = strchr(q, '@');
p = strrchr(q, '@');
SAFE_FREE(session->opts.host);