mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
SSH-01-006: Add missing NULL check in sftp_open()
Fixes T193
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit af2aeba838)
This commit is contained in:
@@ -1855,6 +1855,9 @@ sftp_file sftp_open(sftp_session sftp,
|
||||
return NULL;
|
||||
case SSH_FXP_HANDLE:
|
||||
handle = parse_handle_msg(msg);
|
||||
if (handle == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
sftp_message_free(msg);
|
||||
if ((flags & O_APPEND) == O_APPEND) {
|
||||
stat_data = sftp_stat(sftp, file);
|
||||
|
||||
Reference in New Issue
Block a user