From 85105c671194fda5ef73d311cb6fc90ab048f867 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 17 Oct 2019 14:03:01 -0700 Subject: [PATCH] Use a parameter --- test/core/util/one_corpus_entry_fuzzer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/core/util/one_corpus_entry_fuzzer.cc b/test/core/util/one_corpus_entry_fuzzer.cc index e2d7cdaf937..78f268ffe07 100644 --- a/test/core/util/one_corpus_entry_fuzzer.cc +++ b/test/core/util/one_corpus_entry_fuzzer.cc @@ -29,13 +29,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); extern bool squelch; extern bool leak_check; -int main(int /*argc*/, char** argv) { +int main(int argc, char** argv) { grpc_slice buffer; squelch = false; leak_check = false; /* TODO(yashkt) Calling grpc_init breaks tests. Fix the tests and replace * grpc_core::ExecCtx::GlobalInit with grpc_init and GlobalShutdown with * grpc_shutdown */ + GPR_ASSERT(argc > 1); /* Make sure that we have a filename argument */ GPR_ASSERT( GRPC_LOG_IF_ERROR("load_file", grpc_load_file(argv[1], 0, &buffer))); LLVMFuzzerTestOneInput(GRPC_SLICE_START_PTR(buffer),