aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-05-30 10:59:47 +0200
committerAndreas Schneider <asn@cynapses.org>2010-05-30 10:59:47 +0200
commit2a5d71971c9108d7b8e866c9f2364d4613bc22cb (patch)
treef40e817bcdf86c4f0c4bc3be2ec7e9eb8ead905d
parenta59e65336dc6958043504e6d7b81509edde61640 (diff)
downloadlibssh-2a5d71971c9108d7b8e866c9f2364d4613bc22cb.tar.gz
libssh-2a5d71971c9108d7b8e866c9f2364d4613bc22cb.tar.xz
libssh-2a5d71971c9108d7b8e866c9f2364d4613bc22cb.zip
misc: Make sure the expanded string is null-terminated.
-rw-r--r--libssh/misc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libssh/misc.c b/libssh/misc.c
index 552c0a2..c971367 100644
--- a/libssh/misc.c
+++ b/libssh/misc.c
@@ -664,6 +664,7 @@ char *ssh_path_expand_escape(ssh_session session, const char *s) {
}
l = strlen(buf);
strcat(buf + l, x);
+ buf[i] = '\0';
SAFE_FREE(x);
}