diff --git a/tensorflow/security/fuzzing/BUILD b/tensorflow/security/fuzzing/BUILD index ee3aa6b2299..9b5aeec2d36 100644 --- a/tensorflow/security/fuzzing/BUILD +++ b/tensorflow/security/fuzzing/BUILD @@ -11,11 +11,6 @@ package( licenses = ["notice"], # Apache 2.0 ) -tf_fuzz_target( - name = "demo_fuzz", - srcs = ["demo_fuzz.cc"], -) - tf_fuzz_target( name = "status_fuzz", srcs = ["status_fuzz.cc"], diff --git a/tensorflow/security/fuzzing/demo_fuzz.cc b/tensorflow/security/fuzzing/demo_fuzz.cc deleted file mode 100644 index 71777591694..00000000000 --- a/tensorflow/security/fuzzing/demo_fuzz.cc +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ -#include <cstdint> -#include <cstdlib> - -// This is a demo fuzzer to test that the entire framework functions correctly. -// Once we start moving the existing fuzzers to this framework we will delete -// this. -// TODO(mihaimaruseac): Delete this when no longer needed -void DemoFuzzer(const uint8_t* data, size_t size) { - // Trigger a small bug that should be found by the fuzzer quite quickly - if (size > 10 && size % 3 == 2) - if (data[0] > data[1]) - if (data[5] % data[2] == data[3]) abort(); -} - -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - DemoFuzzer(data, size); - return 0; -} diff --git a/tensorflow/security/fuzzing/status_fuzz.cc b/tensorflow/security/fuzzing/status_fuzz.cc index 36300f54927..7b161645148 100644 --- a/tensorflow/security/fuzzing/status_fuzz.cc +++ b/tensorflow/security/fuzzing/status_fuzz.cc @@ -57,7 +57,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { } tensorflow::Status s = tensorflow::Status(error_code, error_message); - const string actual_message = s.ToString(); + const std::string actual_message = s.ToString(); const std::size_t pos = actual_message.rfind(error_message); assert(pos != std::string::npos); // Suffix is error message assert(pos > 0); // Prefix is error code