]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl plugin: Fix Coverity warning
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 24 Feb 2017 10:13:36 +0000 (12:13 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 26 Feb 2017 12:47:31 +0000 (14:47 +0200)
Just switch the MALLOC_ADD() parameters, so that arithmetic doesn't get
inside a sizeof().

src/plugins/acl/acl-cache.h

index 6b71ed5760e5993fa7d7fab3ab49d551c0f41c76..b7c20658b5cb46cdda55aae975b3fe8739196d25 100644 (file)
@@ -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);