diff options
author | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2018-12-04 15:16:41 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-12-07 17:47:18 +0100 |
commit | eaa97d20620d6b2a557f1ef390fd32723c027f18 (patch) | |
tree | f3747c88d18d0755bd2308c77aae75e55407e9d3 | |
parent | bda2cc69af0e8b7446b91c05b2eb9c242701fb45 (diff) | |
download | libssh-eaa97d20620d6b2a557f1ef390fd32723c027f18.tar.gz libssh-eaa97d20620d6b2a557f1ef390fd32723c027f18.tar.xz libssh-eaa97d20620d6b2a557f1ef390fd32723c027f18.zip |
sftp: Add NULL check in sftp_xstat()
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | src/sftp.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3239,6 +3239,10 @@ static sftp_attributes sftp_xstat(sftp_session sftp, uint32_t id; int rc; + if (sftp == NULL) { + return NULL; + } + if (path == NULL) { ssh_set_error_invalid(sftp->session); sftp_set_error(sftp, SSH_FX_FAILURE); |