• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 Google Inc. All Rights Reserved.
2 // Licensed under the Apache License, Version 2.0 (the "License");
3 #include "my_api.h"
4 
5 #include <string>
6 
7 // Simple fuzz target for DoStuff().
8 // See http://libfuzzer.info for details.
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)9 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
10   std::string str(reinterpret_cast<const char *>(data), size);
11   DoStuff(str);  // Disregard the output.
12   return 0;
13 }
14