From 3ad2a21d13c426392c81fd48caff066b99dbd8b0 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 29 Aug 2022 10:03:40 +0200 Subject: [PATCH] misc: Fix expanding port numbers Signed-off-by: Andreas Schneider Reviewed-by: Jakub Jelen (cherry picked from commit 648baf0f3c567280e6decfa49ebc6fa01b635bdd) --- src/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc.c b/src/misc.c index a2fdf31a..11a7479c 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1237,7 +1237,7 @@ char *ssh_path_expand_escape(ssh_session session, const char *s) } break; case 'p': - if (session->opts.port > 0) { + { char tmp[6]; snprintf(tmp, sizeof(tmp), "%hu",