diff options
author | Mina Farid <minafarid@google.com> | 2018-06-11 17:23:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-11 17:23:07 -0400 |
commit | f5bf0a37a7dd40e7538a1aed77af05471b7fe713 (patch) | |
tree | abb9578990d971d93eb399106bcb8f2d586f7ec4 /Firestore/Example/FuzzTests | |
parent | 6e6462e865e5202868f3478c73a72b082e05b205 (diff) |
Fuzz testing Header Search Paths settings (#1395)
* Modified `HEADER_SEARCH_PATHS` in the project file.
Diffstat (limited to 'Firestore/Example/FuzzTests')
-rw-r--r-- | Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm b/Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm index 63f6db0..038e687 100644 --- a/Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm +++ b/Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm @@ -18,12 +18,22 @@ #include "LibFuzzer/FuzzerDefs.h" +#include "Firestore/core/src/firebase/firestore/remote/serializer.h" + +using firebase::firestore::remote::Serializer; + namespace { +// Fuzz-test the deserialization process in Firestore. The Serializer reads raw +// bytes and converts them to a model object. +void FuzzTestDeserialization(const uint8_t *data, size_t size) { + // TODO(minafarid): fuzz-test Serializer. +} + // Contains the code to be fuzzed. Called by the fuzzing library with // different argument values for `data` and `size`. int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { - // Code to be fuzz-tested here. + FuzzTestDeserialization(data, size); return 0; } @@ -32,7 +42,7 @@ int RunFuzzTestingMain() { // Arguments to libFuzzer main() function should be added to this array, // e.g., dictionaries, corpus, number of runs, jobs, etc. char *program_args[] = { - const_cast<char *>("RunFuzzTestingMain") // First argument is program name. + const_cast<char *>("RunFuzzTestingMain") // First arg is program name. }; char **argv = program_args; int argc = sizeof(program_args) / sizeof(program_args[0]); |