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:
Andreas Schneider
2019-11-05 13:27:47 +01:00
parent d40f33c400
commit d672b1d7c4

View File

@@ -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");
}