mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
misc: Make sure the expanded string is null-terminated.
This commit is contained in:
@@ -634,6 +634,7 @@ char *ssh_path_expand_escape(ssh_session session, const char *s) {
|
|||||||
}
|
}
|
||||||
l = strlen(buf);
|
l = strlen(buf);
|
||||||
strcat(buf + l, x);
|
strcat(buf + l, x);
|
||||||
|
buf[i] = '\0';
|
||||||
SAFE_FREE(x);
|
SAFE_FREE(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user