summaryrefslogtreecommitdiff
path: root/sftp-int.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-08-06 21:30:53 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-08-06 21:30:53 +0000
commit95148e3de293052afa4cc7708bc1547c697903cc (patch)
treee57e64ddd5813b7e5ec6979b5aec0529eab77274 /sftp-int.c
parentae996bf7d1967c83a0e0d71e9e89fa9a27d839f9 (diff)
- jakob@cvs.openbsd.org 2001/07/31 12:42:50
[sftp-int.c sftp-server.c] avoid paths beginning with "//"; <vinschen@redhat.com> ok markus@
Diffstat (limited to 'sftp-int.c')
-rw-r--r--sftp-int.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sftp-int.c b/sftp-int.c
index 573fea1d..0851e63a 100644
--- a/sftp-int.c
+++ b/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 "buffer.h"
#include "xmalloc.h"
@@ -204,7 +204,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);