Commit f37b3414 authored by Max Moroz's avatar Max Moroz Committed by Commit Bot

[net] Fix http2_frame_decoder_fuzzer not to pass nullptr to http2::DecodeBuffer constructor.

The same issue as the one fixed by https://crrev.com/c/1351286.

Bug: 908781
Change-Id: Iba5696ebdebdc286949ab62b24e8c6464354e7d1
Reviewed-on: https://chromium-review.googlesource.com/c/1351948Reviewed-by: default avatarRyan Hamilton <rch@chromium.org>
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611290}
parent 11336bf7
......@@ -18,6 +18,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
size_t chunk_size = fuzzed_data_provider.ConsumeUint32InRange(1, 32);
std::vector<char> chunk =
fuzzed_data_provider.ConsumeBytes<char>(chunk_size);
// http2::DecodeBuffer constructor does not accept nullptr buffer.
if (chunk.data() == nullptr)
continue;
http2::DecodeBuffer frame_data(chunk.data(), chunk.size());
decoder.DecodeFrame(&frame_data);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment