Skip to content

Commit 6a984ea

Browse files
committed
Extend check in calloc_compliance_test
it only checked part of the allocated memory.
1 parent 74fe7d0 commit 6a984ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/malloc_compliance_tests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ void calloc_compliance_test(umf_memory_pool_handle_t hPool) {
9090

9191
ASSERT_NE(alloc_ptr[i], nullptr)
9292
<< "calloc returned NULL, couldn't allocate much memory";
93-
ASSERT_NE(bufferIsFilledWithChar(alloc_ptr[i], alloc_size, 0), 0)
93+
ASSERT_NE(bufferIsFilledWithChar(alloc_ptr[i], alloc_size * (i + 1), 0),
94+
0)
9495
<< "Memory returned by calloc was not zeroed";
9596
}
9697
free_memory(hPool, alloc_ptr);

0 commit comments

Comments
 (0)