From b2aaaaf40cdbc887d50cc0b504e25e199fcb3b13 Mon Sep 17 00:00:00 2001 From: "Angelo G. Del Regno" Date: Sun, 4 Jun 2017 11:02:07 +0200 Subject: Fix comparison of integers of different signs Some variables of different size and sign were getting compared without any safe casting. The build system also throws warnings at this and, being this library used for filesystems, it's really important to ensure stability. --- lib/fuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/fuse.c') diff --git a/lib/fuse.c b/lib/fuse.c index 2ab5b55..d7a7c82 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -1719,7 +1719,7 @@ int fuse_fs_read_buf(struct fuse_fs *fs, const char *path, (unsigned long long) fi->fh, fuse_buf_size(*bufp), (unsigned long long) off); - if (res >= 0 && fuse_buf_size(*bufp) > (int) size) + if (res >= 0 && fuse_buf_size(*bufp) > size) fprintf(stderr, "fuse: read too many bytes\n"); if (res < 0) -- cgit v1.2.3