]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Fix signedness compiler warning with 32bit
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sat, 18 Apr 2020 18:35:04 +0000 (21:35 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Mon, 20 Apr 2020 19:40:24 +0000 (19:40 +0000)
src/lib-index/mail-cache-transaction.c

index d75de363a8cd6f3fec8a1fde7b90e41aaf033a4a..603d3fa901a9a0776f94db295d0ee738469636a6 100644 (file)
@@ -531,7 +531,7 @@ mail_cache_transaction_flush(struct mail_cache_transaction_ctx *ctx,
                if (!ESTALE_FSTAT(errno))
                        mail_cache_set_syscall_error(ctx->cache, "fstat()");
                ret = -1;
-       } else if (st.st_size + ctx->last_rec_pos > ctx->cache->index->optimization_set.cache.max_size) {
+       } else if ((uoff_t)st.st_size + ctx->last_rec_pos > ctx->cache->index->optimization_set.cache.max_size) {
                mail_cache_set_corrupted(ctx->cache, "Cache file too large");
                ret = -1;
        } else {