mirror of
https://github.com/bkthomps/Containers.git
synced 2026-04-05 09:59:53 +00:00
Add overflow checking to array (#111)
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
static void test_invalid_init(void)
|
||||
{
|
||||
assert(!array_init(1, 0));
|
||||
/* These tests rely on this. */
|
||||
assert(sizeof(size_t) == sizeof(unsigned long));
|
||||
assert(!array_init(ULONG_MAX, ULONG_MAX));
|
||||
assert(!array_init(1, ULONG_MAX));
|
||||
}
|
||||
|
||||
static void test_empty_array(void)
|
||||
|
||||
Reference in New Issue
Block a user