Skip to content
Snippets Groups Projects
Commit 31e32445 authored by David Garcia Quintas's avatar David Garcia Quintas
Browse files

Prevent nanopb fuzzers from spamming logs

parent 942c2648
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
bool squelch = true; bool squelch = true;
bool leak_check = true; bool leak_check = true;
static void dont_log(gpr_log_func_args *args) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (squelch) gpr_set_log_function(dont_log);
gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size);
grpc_grpclb_initial_response *response; grpc_grpclb_initial_response *response;
if ((response = grpc_grpclb_initial_response_parse(slice))) { if ((response = grpc_grpclb_initial_response_parse(slice))) {
......
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
bool squelch = true; bool squelch = true;
bool leak_check = true; bool leak_check = true;
static void dont_log(gpr_log_func_args *args) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (squelch) gpr_set_log_function(dont_log);
gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size);
grpc_grpclb_serverlist *serverlist; grpc_grpclb_serverlist *serverlist;
if ((serverlist = grpc_grpclb_response_parse_serverlist(slice))) { if ((serverlist = grpc_grpclb_response_parse_serverlist(slice))) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment