Skip to content

Commit 04a6d40

Browse files
catenacyberaquynh
authored andcommitted
Adds a size limit for inputs to fuzz target (capstone-engine#1167)
1 parent 2b054af commit 04a6d40

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

suite/fuzz/fuzz_disasm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
120120
if (Size < 1) {
121121
// 1 byte for arch choice
122122
return 0;
123+
} else if (Size > 0x1000) {
124+
//limit input to 4kb
125+
Size = 0x1000;
123126
}
124127
if (outfile == NULL) {
125128
// we compute the output

0 commit comments

Comments
 (0)