diff options
author | Ben Laurie <ben@links.org> | 2016-06-04 16:10:49 +0100 |
---|---|---|
committer | Ben Laurie <ben@links.org> | 2016-07-01 13:45:45 +0100 |
commit | 90d28f0519427ffc293f880c423d9c4395a6fcd4 (patch) | |
tree | bb3be2701c6ea2bbe31b6770c1c104fe8c5e4d5c /fuzz/cms.c | |
parent | 2c12f22c3364a1e562a19415f9929359945a7c21 (diff) |
Run the fuzzing corpora as tests.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'fuzz/cms.c')
-rw-r--r-- | fuzz/cms.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fuzz/cms.c b/fuzz/cms.c index 71f691f61b..f97173add3 100644 --- a/fuzz/cms.c +++ b/fuzz/cms.c @@ -16,10 +16,16 @@ #include <openssl/cms.h> #include "fuzzer.h" +int FuzzerInitialize(int *argc, char ***argv) { + return 1; +} + int FuzzerTestOneInput(const uint8_t *buf, size_t len) { + CMS_ContentInfo *i; BIO *in = BIO_new(BIO_s_mem()); + OPENSSL_assert((size_t)BIO_write(in, buf, len) == len); - CMS_ContentInfo *i = d2i_CMS_bio(in, NULL); + i = d2i_CMS_bio(in, NULL); CMS_ContentInfo_free(i); BIO_free(in); return 0; |