summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/sftp-int.c
diff options
context:
space:
mode:
authorJakob Schlyter <jakob@cvs.openbsd.org>2001-07-31 12:42:51 +0000
committerJakob Schlyter <jakob@cvs.openbsd.org>2001-07-31 12:42:51 +0000
commit82d4b55685adc1fdb428ccc384d132d945b269e3 (patch)
tree85365978ae970a8ff0a18e3e5155417b00f9273a /usr.bin/ssh/sftp-int.c
parentd55e26f045f6680217a2a10abdf8f8c18e983f91 (diff)
avoid paths beginning with "//"; <vinschen@redhat.com>
ok markus@
Diffstat (limited to 'usr.bin/ssh/sftp-int.c')
-rw-r--r--usr.bin/ssh/sftp-int.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/sftp-int.c b/usr.bin/ssh/sftp-int.c
index 77b20f5f691..9fb39f843a4 100644
--- a/usr.bin/ssh/sftp-int.c
+++ b/usr.bin/ssh/sftp-int.c
@@ -26,7 +26,7 @@
/* XXX: recursive operations */
#include "includes.h"
-RCSID("$OpenBSD: sftp-int.c,v 1.38 2001/07/09 07:04:53 deraadt Exp $");
+RCSID("$OpenBSD: sftp-int.c,v 1.39 2001/07/31 12:42:50 jakob Exp $");
#include <glob.h>
@@ -206,7 +206,8 @@ path_append(char *p1, char *p2)
ret = xmalloc(len);
strlcpy(ret, p1, len);
- strlcat(ret, "/", len);
+ if (strcmp(p1, "/") != 0)
+ strlcat(ret, "/", len);
strlcat(ret, p2, len);
return(ret);