Skip to content

Commit

Permalink
acl plugin: Fix Coverity warning
Browse files Browse the repository at this point in the history
Just switch the MALLOC_ADD() parameters, so that arithmetic doesn't get
inside a sizeof().
  • Loading branch information
sirainen committed Feb 24, 2017
1 parent 97a8fde commit 9307657
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/acl/acl-cache.h
Expand Up @@ -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);
Expand Down

0 comments on commit 9307657

Please sign in to comment.