aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects/example/my-api-repo/do_stuff_fuzzer.cpp
blob: 087888b4613453adf2c32912ba0b7d7f2c71cf43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright 2017 Google Inc. All Rights Reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
#include "my_api.h"

#include <string>

// Simple fuzz target for DoStuff().
// See http://libfuzzer.info for details.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  std::string str(reinterpret_cast<const char *>(data), size);
  DoStuff(str);  // Disregard the output.
  return 0;
}