Skip to content

Commit

Permalink
Adds a size limit for inputs to fuzz target (capstone-engine#1167)
Browse files Browse the repository at this point in the history
  • Loading branch information
catenacyber authored and aquynh committed Jun 6, 2018
1 parent 2b054af commit 04a6d40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions suite/fuzz/fuzz_disasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
if (Size < 1) {
// 1 byte for arch choice
return 0;
} else if (Size > 0x1000) {
//limit input to 4kb
Size = 0x1000;
}
if (outfile == NULL) {
// we compute the output
Expand Down

0 comments on commit 04a6d40

Please sign in to comment.