fuzz.cc 544 B

123456789101112131415161718192021
  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. #include <stddef.h>
  5. #include <stdint.h>
  6. #include <stdlib.h>
  7. // Entry point for libFuzzer.
  8. extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
  9. int main(int argc, char** argv) {
  10. uint8_t data[32];
  11. for (int i = 0; i < 32; i++) {
  12. for (int j = 0; j < 32; j++) {
  13. data[j] = random() & 0xFF;
  14. }
  15. LLVMFuzzerTestOneInput(data, 32);
  16. }
  17. return 0;
  18. }