diff options
author | Mike Bland <mbland@acm.org> | 2014-07-17 19:08:04 -0400 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2014-07-19 19:24:36 +0100 |
commit | b2e50bcd0e07af1afa31caff049ae636f45be69b (patch) | |
tree | 7ceb74020c3ca7c33ccc593e10faf6ad83409cc2 /test | |
parent | 50bba6852df4d978d0b15ca8a087c6b0ac1a6e87 (diff) | |
download | openssl-b2e50bcd0e07af1afa31caff049ae636f45be69b.tar.gz |
Check the test registry size during add_test()
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/testutil.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/testutil.c b/test/testutil.c index 792d38228d..89e814193c 100644 --- a/test/testutil.c +++ b/test/testutil.c @@ -58,6 +58,7 @@ #include "testutil.h" +#include <assert.h> #include <stdlib.h> #include <stdio.h> @@ -74,6 +75,7 @@ static int num_tests = 0; void add_test(const char* test_case_name, int (*test_fn)()) { + assert(num_tests != (sizeof(all_tests) / sizeof(all_tests)[0])); all_tests[num_tests].test_case_name = test_case_name; all_tests[num_tests].test_fn = test_fn; ++num_tests; |