Fix a possible segfault in sftp_canonicalize_path().

This commit is contained in:
Andreas Schneider
2009-07-23 18:34:25 +02:00
parent 1939a55c3c
commit 9450a3c987

View File

@@ -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;