diff --git a/qiboot/src/utils.c b/qiboot/src/utils.c index 3d72ec2..7e92288 100644 --- a/qiboot/src/utils.c +++ b/qiboot/src/utils.c @@ -271,7 +271,7 @@ void *malloc(size_t size) { void *p = malloc_pointer; - malloc_pointer += size; + malloc_pointer += (size & ~3) + 4; if (((u8 *)malloc_pointer - &malloc_pool[0]) > sizeof(malloc_pool)) { puts("Ran out of malloc pool\n");