blob: bce13feb790f09ad336ebae5a39c429bb765294d [file] [log] [blame]
George Karpenkov10ab2ac2017-08-21 23:25:50 +00001// This file is distributed under the University of Illinois Open Source
2// License. See LICENSE.TXT for details.
3
4// Simple test for a fuzzer: find the interesting argument for div.
5#include <assert.h>
6#include <cstddef>
7#include <cstdint>
8#include <cstring>
9#include <iostream>
10
11static volatile int Sink;
12
13extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
14 if (Size < 4) return 0;
15 int a;
16 memcpy(&a, Data, 4);
17 Sink = 12345678 / (987654 - a);
18 return 0;
19}
20