diff options
author | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2018-12-04 15:17:06 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-12-07 17:47:22 +0100 |
commit | f05717d23e31a7776df863cd3c0a302bd8b7e8f3 (patch) | |
tree | 3cd8228282f98d5bd6ee3a812907b06b6ba41b33 | |
parent | eaa97d20620d6b2a557f1ef390fd32723c027f18 (diff) | |
download | libssh-f05717d23e31a7776df863cd3c0a302bd8b7e8f3.tar.gz libssh-f05717d23e31a7776df863cd3c0a302bd8b7e8f3.tar.xz libssh-f05717d23e31a7776df863cd3c0a302bd8b7e8f3.zip |
sftp: Add NULL check in sftp_fstat()
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
-rw-r--r-- | src/sftp.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3323,6 +3323,10 @@ sftp_attributes sftp_fstat(sftp_file file) uint32_t id; int rc; + if (file == NULL) { + return NULL; + } + buffer = ssh_buffer_new(); if (buffer == NULL) { ssh_set_error_oom(file->sftp->session); |