1 // Copyright 2024 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include <cstdlib> 6 #include <iostream> 7 #include <string> 8 9 #include "testing/libfuzzer/proto/string_compare.pb.h" 10 #include "third_party/libprotobuf-mutator/src/src/libfuzzer/libfuzzer_macro.h" 11 DEFINE_BINARY_PROTO_FUZZER(const string_compare::StringCompare & proto)12DEFINE_BINARY_PROTO_FUZZER(const string_compare::StringCompare& proto) { 13 if (proto.value() == "fish") { 14 std::cout << "Found fish\n"; 15 exit(1); 16 } 17 } 18