changeset 21698:afe2bff4d292

acl plugin: Fix Coverity warning Just switch the MALLOC_ADD() parameters, so that arithmetic doesn't get inside a sizeof().
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Fri, 24 Feb 2017 12:13:36 +0200
parents 0d071dadb856
children fbe64fac58c6
files src/plugins/acl/acl-cache.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/acl/acl-cache.h	Thu Feb 23 19:38:31 2017 +0100
+++ b/src/plugins/acl/acl-cache.h	Fri Feb 24 12:13:36 2017 +0200
@@ -14,7 +14,7 @@
 	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);