mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 10:26:47 +09:00
sftp: Add NULL check in sftp_fstat()
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
committed by
Andreas Schneider
parent
eaa97d2062
commit
f05717d23e
@@ -3323,6 +3323,10 @@ sftp_attributes sftp_fstat(sftp_file file)
|
|||||||
uint32_t id;
|
uint32_t id;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (file == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
buffer = ssh_buffer_new();
|
buffer = ssh_buffer_new();
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
ssh_set_error_oom(file->sftp->session);
|
ssh_set_error_oom(file->sftp->session);
|
||||||
|
|||||||
Reference in New Issue
Block a user