Paul Wankadia | bfa5864 | 2016-05-24 18:36:12 +1000 | [diff] [blame] | 1 | // Copyright 2016 The RE2 Authors. All Rights Reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | #include <stddef.h> |
| 6 | #include <stdint.h> |
| 7 | #include <stdlib.h> |
| 8 | |
| 9 | // Entry point for libFuzzer. |
| 10 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); |
| 11 | |
| 12 | int main(int argc, char** argv) { |
Paul Wankadia | 3a8436a | 2023-02-20 10:29:01 -0800 | [diff] [blame] | 13 | uint8_t data[4096]; |
| 14 | for (int i = 0; i < 4096; i++) { |
| 15 | for (int j = 0; j < 4096; j++) { |
Paul Wankadia | bfa5864 | 2016-05-24 18:36:12 +1000 | [diff] [blame] | 16 | data[j] = random() & 0xFF; |
| 17 | } |
Paul Wankadia | 3a8436a | 2023-02-20 10:29:01 -0800 | [diff] [blame] | 18 | LLVMFuzzerTestOneInput(data, 4096); |
Paul Wankadia | bfa5864 | 2016-05-24 18:36:12 +1000 | [diff] [blame] | 19 | } |
| 20 | return 0; |
| 21 | } |