aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
Diffstat (limited to 'libssh')
-rw-r--r--libssh/sftp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libssh/sftp.c b/libssh/sftp.c
index fa8e1214..790984aa 100644
--- a/libssh/sftp.c
+++ b/libssh/sftp.c
@@ -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;