mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
Fix unclean null termination in ~ expending
This commit is contained in:
committed by
Andreas Schneider
parent
560e938038
commit
ac93e2aea7
@@ -584,7 +584,7 @@ char *ssh_path_expand_tilde(const char *d) {
|
|||||||
if (lh > 0) {
|
if (lh > 0) {
|
||||||
memcpy(r, h, lh);
|
memcpy(r, h, lh);
|
||||||
}
|
}
|
||||||
memcpy(r + lh, p, ld);
|
memcpy(r + lh, p, ld + 1);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user