2 * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL licenses, (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * https://www.openssl.org/source/license.html
8 * or in the file LICENSE in the source distribution.
12 * Given a list of files, run each of them through the fuzzer. Note that
13 * failure will be indicated by some kind of crash. Switching on things like
14 * asan improves the test.
20 #include <openssl/crypto.h>
23 int main(int argc, char **argv) {
26 FuzzerInitialize(&argc, &argv);
28 for (n = 1; n < argc; ++n) {
35 f = fopen(argv[n], "rb");
38 buf = malloc(st.st_size);
39 s = fread(buf, 1, st.st_size, f);
40 OPENSSL_assert(s == (size_t)st.st_size);
41 FuzzerTestOneInput(buf, s);