Skip to content

Commit

Permalink
Merge pull request #1413 from frank-kue:fix-1412-wrong-memory-alignment
Browse files Browse the repository at this point in the history
Fix #1412, Wrong memory alignment calculation
  • Loading branch information
dzbaker committed Dec 5, 2023
2 parents 0291622 + 51ec0e4 commit 120fe93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unit-test-coverage/ut-stubs/src/libc-stdlib-stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void *OCS_malloc(size_t sz)
return NULL;
}

NextSize = (NextSize + MPOOL_ALIGN - 1) & ~((size_t)MPOOL_ALIGN);
NextSize = (NextSize + MPOOL_ALIGN - 1) & ~((size_t)MPOOL_ALIGN - 1);
NextBlock = Rec->BlockAddr + MPOOL_ALIGN;
Rec->BlockAddr += NextSize;
Rec->Size += NextSize;
Expand Down

0 comments on commit 120fe93

Please sign in to comment.