Skip to content

Commit

Permalink
Fix formatting of fuzzers
Browse files Browse the repository at this point in the history
Reviewed-by: Rich Salz <[email protected]>
GH: openssl#2023
  • Loading branch information
kroeckx committed Dec 2, 2016
1 parent 82cb311 commit f3e911d
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 21 deletions.
6 changes: 4 additions & 2 deletions fuzz/asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 4 additions & 2 deletions fuzz/asn1parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
#include <openssl/x509v3.h>
#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)
Expand Down
6 changes: 4 additions & 2 deletions fuzz/bignum.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
#include <openssl/bn.h>
#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;
Expand Down
6 changes: 4 additions & 2 deletions fuzz/bndiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
#include <openssl/bn.h>
#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;
Expand Down
6 changes: 4 additions & 2 deletions fuzz/cms.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
#include <openssl/cms.h>
#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) {
Expand Down
6 changes: 4 additions & 2 deletions fuzz/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
#include <openssl/conf.h>
#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;
Expand Down
6 changes: 4 additions & 2 deletions fuzz/crl.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
#include <openssl/bio.h>
#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;

Expand Down
6 changes: 4 additions & 2 deletions fuzz/ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
#include <openssl/ct.h>
#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);
Expand Down
3 changes: 2 additions & 1 deletion fuzz/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 4 additions & 2 deletions fuzz/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions fuzz/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
#include <openssl/bio.h>
#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;

Expand Down

0 comments on commit f3e911d

Please sign in to comment.