Fix leak when running b64_decode_fuzzer tests.

pull/21459/head
Ivan Posva 5 years ago
parent 944e6f9ad4
commit a1cf1eb4bc
  1. 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