-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a basic fuzzer for Http2DecoderAdapter.
Future improvements could include a dictionary or corpus. PiperOrigin-RevId: 536418050
- Loading branch information
1 parent
8294639
commit 31bbf1d
Showing
4 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <cstddef> | ||
#include <cstdint> | ||
|
||
#include "quiche/spdy/core/http2_frame_decoder_adapter.h" | ||
#include "quiche/spdy/core/spdy_no_op_visitor.h" | ||
|
||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { | ||
spdy::SpdyNoOpVisitor visitor; | ||
http2::Http2DecoderAdapter decoder; | ||
decoder.set_visitor(&visitor); | ||
decoder.ProcessInput(reinterpret_cast<const char *>(data), size); | ||
return 0; // Always return 0; other values are reserved for future uses. | ||
} |