From e4e865f0c08485d26562f91071169880b0feab4f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 10 Jun 2016 00:29:59 -0700 Subject: Fix fuzzing detected bug --- src/core/ext/load_reporting/load_reporting.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/load_reporting/load_reporting.c b/src/core/ext/load_reporting/load_reporting.c index 60082dbaaa..9e4d32676f 100644 --- a/src/core/ext/load_reporting/load_reporting.c +++ b/src/core/ext/load_reporting/load_reporting.c @@ -76,7 +76,8 @@ static bool is_load_reporting_enabled(const grpc_channel_args *a) { if (a == NULL) return false; for (size_t i = 0; i < a->num_args; i++) { if (0 == strcmp(a->args[i].key, GRPC_ARG_ENABLE_LOAD_REPORTING)) { - return a->args[i].value.pointer.p != NULL; + return a->args[i].type == GRPC_ARG_POINTER && + a->args[i].value.pointer.p != NULL; } } return false; -- cgit v1.2.3