aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-05-31 11:50:52 +0300
committerAndreas Schneider <asn@cynapses.org>2010-05-31 11:19:10 +0200
commitac93e2aea742b379161e085d3c08f3cd49ece702 (patch)
tree8007d5396b3a1dfb2535dc3952b7d7d976e6b300
parent560e93803804224c137d8dee6eae99ab2296734a (diff)
downloadlibssh-ac93e2aea742b379161e085d3c08f3cd49ece702.tar.gz
libssh-ac93e2aea742b379161e085d3c08f3cd49ece702.tar.xz
libssh-ac93e2aea742b379161e085d3c08f3cd49ece702.zip
Fix unclean null termination in ~ expending
-rw-r--r--libssh/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libssh/misc.c b/libssh/misc.c
index 555c25b..676ed76 100644
--- a/libssh/misc.c
+++ b/libssh/misc.c
@@ -584,7 +584,7 @@ char *ssh_path_expand_tilde(const char *d) {
if (lh > 0) {
memcpy(r, h, lh);
}
- memcpy(r + lh, p, ld);
+ memcpy(r + lh, p, ld + 1);
return r;
}