aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/transport/chttp2/hpack_parser_fuzzer_test.c
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2016-11-08 11:28:13 -0800
committerGravatar Muxi Yan <mxyan@google.com>2016-11-08 11:28:13 -0800
commit10a27c14273d401b730eff95df37197a63d25cc3 (patch)
tree48e256ff6021ea24a918ebd8602a7cbfd77f35f6 /test/core/transport/chttp2/hpack_parser_fuzzer_test.c
parente266d9fc7519a1cb7f46c84d7ad1dd8669bbfac7 (diff)
parentdb096f3dba94e11bd8f78ed1ed7ff15ea585cd4f (diff)
Merge remote-tracking branch 'upstream/master' into no-authority-header-in-cronet
Diffstat (limited to 'test/core/transport/chttp2/hpack_parser_fuzzer_test.c')
-rw-r--r--test/core/transport/chttp2/hpack_parser_fuzzer_test.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.c b/test/core/transport/chttp2/hpack_parser_fuzzer_test.c
index b7f68e0dd4..95acbf1a68 100644
--- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.c
+++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.c
@@ -43,7 +43,9 @@
bool squelch = true;
bool leak_check = true;
-static void onhdr(void *ud, grpc_mdelem *md) { GRPC_MDELEM_UNREF(md); }
+static void onhdr(grpc_exec_ctx *exec_ctx, void *ud, grpc_mdelem *md) {
+ GRPC_MDELEM_UNREF(md);
+}
static void dont_log(gpr_log_func_args *args) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
@@ -53,7 +55,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
grpc_chttp2_hpack_parser parser;
grpc_chttp2_hpack_parser_init(&parser);
parser.on_header = onhdr;
- GRPC_ERROR_UNREF(grpc_chttp2_hpack_parser_parse(&parser, data, data + size));
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ GRPC_ERROR_UNREF(
+ grpc_chttp2_hpack_parser_parse(&exec_ctx, &parser, data, data + size));
+ grpc_exec_ctx_finish(&exec_ctx);
grpc_chttp2_hpack_parser_destroy(&parser);
grpc_shutdown();
return 0;