diff options
| author | Andreas Schneider <mail@cynapses.org> | 2009-07-23 18:34:25 +0200 |
|---|---|---|
| committer | Andreas Schneider <mail@cynapses.org> | 2009-07-23 18:34:25 +0200 |
| commit | 9450a3c9874137d316b78a11d5ae21b887b9f1b2 (patch) | |
| tree | 2b1edbe64c5d3acee625f3079c0fcb96bc37f834 /libssh | |
| parent | 1939a55c3cae415ae295134d54e34a2daec43438 (diff) | |
Fix a possible segfault in sftp_canonicalize_path().
Diffstat (limited to 'libssh')
| -rw-r--r-- | libssh/sftp.c | 4 |
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; |
