Skip to content

Commit 832ae16

Browse files
committed
added more comments that the problem is on purpose
1 parent 42216df commit 832ae16

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

fuzz_test/fuzz_tester.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
#include <stdint.h>
2-
#include <stddef.h>
1+
#include <cstdint>
2+
#include <cstddef>
33

4-
5-
// example comes from here: https://github.com/google/fuzzing/blob/master/tutorial/libFuzzer/fuzz_me.cc
6-
// Documentation can be found here: https://llvm.org/docs/LibFuzzer.html
4+
/*
5+
* example comes from here: https://github.com/google/fuzzing/blob/master/tutorial/libFuzzer/fuzz_me.cc
6+
* Documentation can be found here: https://llvm.org/docs/LibFuzzer.html
7+
*/
78
bool FuzzMe(const uint8_t *Data, size_t DataSize) {
89
return DataSize >= 3 &&
910
Data[0] == 'F' &&
1011
Data[1] == 'U' &&
1112
Data[2] == 'Z' &&
13+
// the following is on purpose to demonstrate an error
1214
Data[3] == 'Z'; // :‑<
1315
}
1416

0 commit comments

Comments
 (0)