misc: Fix expanding port numbers

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 648baf0f3c)

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andreas Schneider
2022-08-29 10:03:40 +02:00
committed by Jakub Jelen
parent fd1add66cf
commit cb8245a0e4

View File

@@ -1164,7 +1164,7 @@ char *ssh_path_expand_escape(ssh_session session, const char *s) {
x = strdup(session->opts.username);
break;
case 'p':
if (session->opts.port > 0) {
{
char tmp[6];
snprintf(tmp, sizeof(tmp), "%hu",