misc: Make sure the expanded string is null-terminated.

This commit is contained in:
Andreas Schneider
2010-05-30 10:59:47 +02:00
parent 26989ab001
commit 3ae187dbe7

View File

@@ -634,6 +634,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);
}