From: Kurt Roeckx Date: Sat, 19 Nov 2016 16:10:35 +0000 (+0100) Subject: Fix formatting of fuzzers X-Git-Tag: OpenSSL_1_1_1-pre1~2949 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f3e911d5ed16db6a129306675e20e51d1ee81e1a;p=oweals%2Fopenssl.git Fix formatting of fuzzers Reviewed-by: Rich Salz GH: #2023 --- diff --git a/fuzz/asn1.c b/fuzz/asn1.c index 5125f363ff..0644ed79e1 100644 --- a/fuzz/asn1.c +++ b/fuzz/asn1.c @@ -183,11 +183,13 @@ static ASN1_ITEM_EXP *item_type[] = { NULL }; -int FuzzerInitialize(int *argc, char ***argv) { +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) +{ int n; ASN1_PCTX *pctx = ASN1_PCTX_new(); diff --git a/fuzz/asn1parse.c b/fuzz/asn1parse.c index b3a6dab0ea..2fba1c44b6 100644 --- a/fuzz/asn1parse.c +++ b/fuzz/asn1parse.c @@ -18,11 +18,13 @@ #include #include "fuzzer.h" -int FuzzerInitialize(int *argc, char ***argv) { +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) +{ static BIO *bio_out; if (bio_out == NULL) diff --git a/fuzz/bignum.c b/fuzz/bignum.c index 43e134bc14..9e110f65ef 100644 --- a/fuzz/bignum.c +++ b/fuzz/bignum.c @@ -17,11 +17,13 @@ #include #include "fuzzer.h" -int FuzzerInitialize(int *argc, char ***argv) { +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) +{ static BN_CTX *ctx; static BIGNUM *b1; static BIGNUM *b2; diff --git a/fuzz/bndiv.c b/fuzz/bndiv.c index 45a3937992..9319878607 100644 --- a/fuzz/bndiv.c +++ b/fuzz/bndiv.c @@ -17,11 +17,13 @@ #include #include "fuzzer.h" -int FuzzerInitialize(int *argc, char ***argv) { +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) +{ static BN_CTX *ctx; static BIGNUM *b1; static BIGNUM *b2; diff --git a/fuzz/cms.c b/fuzz/cms.c index 94390e7c91..71d8b6953c 100644 --- a/fuzz/cms.c +++ b/fuzz/cms.c @@ -16,11 +16,13 @@ #include #include "fuzzer.h" -int FuzzerInitialize(int *argc, char ***argv) { +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; if (!len) { diff --git a/fuzz/conf.c b/fuzz/conf.c index 30b13c84f9..49edb3eaa6 100644 --- a/fuzz/conf.c +++ b/fuzz/conf.c @@ -15,11 +15,13 @@ #include #include "fuzzer.h" -int FuzzerInitialize(int *argc, char ***argv) { +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) +{ CONF *conf; BIO *in; long eline; diff --git a/fuzz/crl.c b/fuzz/crl.c index 728943f551..51d184363a 100644 --- a/fuzz/crl.c +++ b/fuzz/crl.c @@ -12,11 +12,13 @@ #include #include "fuzzer.h" -int FuzzerInitialize(int *argc, char ***argv) { +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) +{ const unsigned char *p = buf; unsigned char *der = NULL; diff --git a/fuzz/ct.c b/fuzz/ct.c index 411ccef4a0..636b195109 100644 --- a/fuzz/ct.c +++ b/fuzz/ct.c @@ -16,11 +16,13 @@ #include #include "fuzzer.h" -int FuzzerInitialize(int *argc, char ***argv) { +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) +{ const uint8_t **pp = &buf; unsigned char *der = NULL; STACK_OF(SCT) *scts = d2i_SCT_LIST(NULL, pp, len); diff --git a/fuzz/driver.c b/fuzz/driver.c index c530fedc84..2c16a5e2e6 100644 --- a/fuzz/driver.c +++ b/fuzz/driver.c @@ -22,7 +22,8 @@ int LLVMFuzzerInitialize(int *argc, char ***argv) return 0; } -int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) { +int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) +{ return FuzzerTestOneInput(buf, len); } diff --git a/fuzz/server.c b/fuzz/server.c index 35449d8caa..26ef4da1e6 100644 --- a/fuzz/server.c +++ b/fuzz/server.c @@ -191,7 +191,8 @@ static const uint8_t kRSAPrivateKeyDER[] = { static SSL_CTX *ctx; -int FuzzerInitialize(int *argc, char ***argv) { +int FuzzerInitialize(int *argc, char ***argv) +{ const uint8_t *bufp = kRSAPrivateKeyDER; RSA *privkey; EVP_PKEY *pkey; @@ -216,7 +217,8 @@ 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) +{ SSL *server; BIO *in; BIO *out; diff --git a/fuzz/x509.c b/fuzz/x509.c index b2851f1e11..4c5b73258d 100644 --- a/fuzz/x509.c +++ b/fuzz/x509.c @@ -12,11 +12,13 @@ #include #include "fuzzer.h" -int FuzzerInitialize(int *argc, char ***argv) { +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) +{ const unsigned char *p = buf; unsigned char *der = NULL;