mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Fix a possible segfault in sftp_canonicalize_path().
This commit is contained in:
@@ -2223,6 +2223,10 @@ char *sftp_canonicalize_path(SFTP_SESSION *sftp, const char *path) {
|
||||
u32 ignored;
|
||||
u32 id;
|
||||
|
||||
if (sftp == NULL || path == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
buffer = buffer_new();
|
||||
if (buffer == NULL) {
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user