Merge pull request #21459 from iposva-google/fuzzer-5759629707444224

Fix leak when running b64_decode_fuzzer tests.
pull/21472/head
Vijay Pai 5 years ago committed by GitHub
commit 12757dab1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      test/core/slice/b64_decode_corpus/testcase-5759629707444224
  2. 5
      test/core/slice/b64_decode_fuzzer.cc

@ -27,7 +27,8 @@ bool leak_check = true;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (size < 1) return 0;
const bool url_safe = static_cast<uint8_t>(0x100) < data[0];
grpc_base64_decode_with_len(reinterpret_cast<const char*>(data + 1), size - 1,
url_safe);
grpc_slice res = grpc_base64_decode_with_len(
reinterpret_cast<const char*>(data + 1), size - 1, url_safe);
grpc_slice_unref(res);
return 0;
}

Loading…
Cancel
Save