From: Timo Sirainen Date: Fri, 24 Feb 2017 10:13:36 +0000 (+0200) Subject: acl plugin: Fix Coverity warning X-Git-Tag: 2.2.29.rc1~210 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e7b2e59360809444fac12ba09481bd52becf3d9a;p=thirdparty%2Fdovecot%2Fcore.git acl plugin: Fix Coverity warning Just switch the MALLOC_ADD() parameters, so that arithmetic doesn't get inside a sizeof(). --- diff --git a/src/plugins/acl/acl-cache.h b/src/plugins/acl/acl-cache.h index 6b71ed5760..b7c20658b5 100644 --- a/src/plugins/acl/acl-cache.h +++ b/src/plugins/acl/acl-cache.h @@ -14,7 +14,7 @@ struct acl_mask { unsigned char mask[1]; }; #define SIZEOF_ACL_MASK(bitmask_size) \ - (MALLOC_ADD(sizeof(pool_t) + sizeof(unsigned int), (bitmask_size))) + (MALLOC_ADD((bitmask_size), sizeof(pool_t) + sizeof(unsigned int))) struct acl_cache *acl_cache_init(struct acl_backend *backend, size_t validity_rec_size);