aboutsummaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/misc.c b/src/misc.c
index c7174b84..25df5910 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1012,6 +1012,7 @@ char *ssh_path_expand_escape(ssh_session session, const char *s) {
for (i = 0; *p != '\0'; p++) {
if (*p != '%') {
+ escape:
buf[i] = *p;
i++;
if (i >= MAX_BUF_SIZE) {
@@ -1028,6 +1029,8 @@ char *ssh_path_expand_escape(ssh_session session, const char *s) {
}
switch (*p) {
+ case '%':
+ goto escape;
case 'd':
x = strdup(session->opts.sshdir);
break;