aboutsummaryrefslogtreecommitdiff
path: root/src/sftp.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-11-05 13:27:47 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-12-09 16:08:03 +0100
commitd672b1d7c4a966d9d1224327ca3d097410ac26a3 (patch)
tree7834cd388120d9ec7fc8a67a1ccd9d1857db8eab /src/sftp.c
parentd40f33c400ab991a17e7b7499dd5f0fa6e8d2bef (diff)
downloadlibssh-d672b1d7c4a966d9d1224327ca3d097410ac26a3.tar.gz
libssh-d672b1d7c4a966d9d1224327ca3d097410ac26a3.tar.xz
libssh-d672b1d7c4a966d9d1224327ca3d097410ac26a3.zip
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>
Diffstat (limited to 'src/sftp.c')
-rw-r--r--src/sftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sftp.c b/src/sftp.c
index 13226f9a..71ab81cd 100644
--- a/src/sftp.c
+++ b/src/sftp.c
@@ -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");
}