mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
sftp: Check for NULL path and give correct error
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -3088,6 +3088,11 @@ static sftp_attributes sftp_xstat(sftp_session sftp, const char *path,
|
||||
ssh_buffer buffer;
|
||||
uint32_t id;
|
||||
|
||||
if (path == NULL) {
|
||||
ssh_set_error_invalid(sftp->session);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
buffer = ssh_buffer_new();
|
||||
if (buffer == NULL) {
|
||||
ssh_set_error_oom(sftp->session);
|
||||
|
||||
Reference in New Issue
Block a user