Fix fuzzing detected error

pull/10102/head
Craig Tiller 8 years ago
parent 98abdbaa14
commit 7e43bfa1fa
  1. 10
      src/core/ext/transport/chttp2/transport/hpack_parser.c
  2. BIN
      test/core/transport/chttp2/hpack_parser_corpus/clusterfuzz-testcase-5298216461402112
  3. 22
      tools/run_tests/generated/tests.json

@ -1625,8 +1625,14 @@ grpc_error *grpc_chttp2_hpack_parser_parse(grpc_exec_ctx *exec_ctx,
stack space usage when no tail call optimization is
available */
p->current_slice_refcount = slice.refcount;
grpc_error *error = p->state(exec_ctx, p, GRPC_SLICE_START_PTR(slice),
GRPC_SLICE_END_PTR(slice));
uint8_t *start = GRPC_SLICE_START_PTR(slice);
uint8_t *end = GRPC_SLICE_END_PTR(slice);
grpc_error *error = GRPC_ERROR_NONE;
while (start != end && error == GRPC_ERROR_NONE) {
uint8_t *target = start + GPR_MIN(1024, end - start);
error = p->state(exec_ctx, p, start, target);
start = target;
}
p->current_slice_refcount = NULL;
return error;
}

@ -114587,6 +114587,28 @@
],
"uses_polling": false
},
{
"args": [
"test/core/transport/chttp2/hpack_parser_corpus/clusterfuzz-testcase-5298216461402112"
],
"ci_platforms": [
"linux"
],
"cpu_cost": 0.1,
"exclude_configs": [
"tsan"
],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "hpack_parser_fuzzer_test_one_entry",
"platforms": [
"linux"
],
"uses_polling": false
},
{
"args": [
"test/core/transport/chttp2/hpack_parser_corpus/crash-5ac3e1ea7764cfb6383629574262f82dc7b3cada"

Loading…
Cancel
Save