From ac93e2aea742b379161e085d3c08f3cd49ece702 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Mon, 31 May 2010 11:50:52 +0300 Subject: Fix unclean null termination in ~ expending --- libssh/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libssh/misc.c b/libssh/misc.c index 555c25b4..676ed76c 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; } -- cgit