sftp: Add NULL check in sftp_opendir()
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
83d827d7dd
Коммит
bda2cc69af
@ -958,6 +958,10 @@ sftp_dir sftp_opendir(sftp_session sftp, const char *path)
|
||||
uint32_t id;
|
||||
int rc;
|
||||
|
||||
if (sftp == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
payload = ssh_buffer_new();
|
||||
if (payload == NULL) {
|
||||
ssh_set_error_oom(sftp->session);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user