projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Run the fuzzing corpora as tests.
[openssl.git]
/
fuzz
/
cms.c
diff --git
a/fuzz/cms.c
b/fuzz/cms.c
index 71f691f61b78aa58cd065856b2cea2ed516c26c1..f97173add354f77fda7953f257523dd02b4c919a 100644
(file)
--- a/
fuzz/cms.c
+++ b/
fuzz/cms.c
@@
-16,10
+16,16
@@
#include <openssl/cms.h>
#include "fuzzer.h"
#include <openssl/cms.h>
#include "fuzzer.h"
+int FuzzerInitialize(int *argc, char ***argv) {
+ return 1;
+}
+
int FuzzerTestOneInput(const uint8_t *buf, size_t len) {
int FuzzerTestOneInput(const uint8_t *buf, size_t len) {
+ CMS_ContentInfo *i;
BIO *in = BIO_new(BIO_s_mem());
BIO *in = BIO_new(BIO_s_mem());
+
OPENSSL_assert((size_t)BIO_write(in, buf, len) == len);
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;
CMS_ContentInfo_free(i);
BIO_free(in);
return 0;