mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
sftp: Avoid comparison of integers of different sizes
This casts ssize_t len to size_t. Fixes T188 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -2159,7 +2159,7 @@ ssize_t sftp_write(sftp_file file, const void *buf, size_t count) {
|
||||
ssh_buffer_free(buffer);
|
||||
if (len < 0) {
|
||||
return -1;
|
||||
} else if (len != packetlen) {
|
||||
} else if ((size_t)len != packetlen) {
|
||||
SSH_LOG(SSH_LOG_PACKET,
|
||||
"Could not write as much data as expected");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user