kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit cf6cf5f820e4531c548bca18806570730207a429
parent 685f50456483fc9b3dde26a73a44c809fb02df5b
Author: Joris Vink <joris@coders.se>
Date:   Sat, 11 Dec 2021 22:35:37 +0100

Always align pool element lengths properly.

Enforce 8-byte alignment on the pool element lengths.

Diffstat:
src/pool.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/pool.c b/src/pool.c @@ -47,6 +47,8 @@ kore_pool_init(struct kore_pool *pool, const char *name, if ((pool->name = strdup(name)) == NULL) fatal("kore_pool_init: strdup %s", errno_s); + len = (len + (8 - 1)) & ~(8 - 1); + pool->lock = 0; pool->elms = 0; pool->inuse = 0;