Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: testing/libfuzzer/fuzzers/openssl_bio_string_fuzzer.cc

Issue 2391393005: Remove openssl_bio_string. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/libfuzzer/fuzzers/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/libfuzzer/fuzzers/openssl_bio_string_fuzzer.cc
diff --git a/testing/libfuzzer/fuzzers/openssl_bio_string_fuzzer.cc b/testing/libfuzzer/fuzzers/openssl_bio_string_fuzzer.cc
deleted file mode 100644
index 4eec5d8cece2d7b3eecf46546d8975e8f3ddbee1..0000000000000000000000000000000000000000
--- a/testing/libfuzzer/fuzzers/openssl_bio_string_fuzzer.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <stdint.h>
-
-#include "crypto/openssl_bio_string.h"
-#include "crypto/scoped_openssl_types.h"
-
-
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- if (size == 0) { return 0; }
-
- std::string buffer;
- std::string input(reinterpret_cast<const char*>(data), size);
-
- std::size_t data_hash = std::hash<std::string>()(input);
- uint8_t choice = data_hash % 3;
-
- crypto::ScopedBIO bio(crypto::BIO_new_string(&buffer));
- if (choice == 0) {
- BIO_printf(bio.get(), "%s", input.c_str());
- } else if (choice == 1) {
- BIO_write(bio.get(), input.c_str(), size);
- } else {
- BIO_puts(bio.get(), input.c_str());
- }
- BIO_flush(bio.get());
-
- return 0;
-}
-
« no previous file with comments | « testing/libfuzzer/fuzzers/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698