Skip to content
Snippets Groups Projects
Unverified Commit 541c9f30 authored by Arjun Roy's avatar Arjun Roy Committed by GitHub
Browse files

Merge pull request #20056 from arjunroy/hpack_parser_fuzz_fix

Fix hpack parser fuzzer failure.
parents c1020285 6e159d3e
No related branches found
No related tags found
No related merge requests found
...@@ -108,7 +108,7 @@ struct ManagedMemorySlice : public grpc_slice { ...@@ -108,7 +108,7 @@ struct ManagedMemorySlice : public grpc_slice {
return !grpc_slice_differs_refcounted(other, *this); return !grpc_slice_differs_refcounted(other, *this);
} }
bool Equals(const char* buf, const size_t len) const { bool Equals(const char* buf, const size_t len) const {
return data.refcounted.length == len && return data.refcounted.length == len && buf != nullptr &&
memcmp(buf, data.refcounted.bytes, len) == 0; memcmp(buf, data.refcounted.bytes, len) == 0;
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment