mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 21:00:33 +09:00
sftp: Add NULL check in sftp_xstat()
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
bda2cc69af
commit
eaa97d2062
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user