aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mina Farid <minafarid@google.com>2018-07-13 15:02:48 -0400
committerGravatar GitHub <noreply@github.com>2018-07-13 15:02:48 -0400
commit730780faf41fc828fca711267a6de785184ffe3f (patch)
tree92c32f306777925b1cfae36af9dbc55764224523
parentfb9f24eaee4c57d09ec0dca32abff840b39f7c7e (diff)
Fuzz testing Serializer with a dictionary and corpus (#1513)
Added functionality to read dictionary file and seed input corpus from bundle
-rw-r--r--Firestore/Example/Firestore.xcodeproj/project.pbxproj22
-rw-r--r--Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm40
-rwxr-xr-xFirestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh61
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/arr-strings-0116
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-0123
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-0247
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-0391
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-boolean-0115
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-boolean-0215
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-0115
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-0215
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-0315
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-0415
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-0515
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-0615
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-0715
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-0815
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-0915
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-0115
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-0215
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-0315
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-0415
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-0515
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-0615
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-0715
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-map-0120
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-map-0224
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-0115
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-0215
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-0315
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-0415
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-0515
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-0615
-rw-r--r--Firestore/Example/FuzzTests/FuzzingResources/Serializer/serializer.dictionary30
34 files changed, 723 insertions, 11 deletions
diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj
index 08e4926..65e6958 100644
--- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj
+++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj
@@ -161,6 +161,7 @@
618BBEB020B89AAC00B5BCE7 /* http.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9720B89AAC00B5BCE7 /* http.pb.cc */; };
618BBEB120B89AAC00B5BCE7 /* status.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9920B89AAC00B5BCE7 /* status.pb.cc */; };
61F72C5620BC48FD001A68CB /* serializer_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 61F72C5520BC48FD001A68CB /* serializer_test.cc */; };
+ 6E59498D20F55BA800ECD9A5 /* FuzzingResources in Resources */ = {isa = PBXBuildFile; fileRef = 6ED6DEA120F5502700FC6076 /* FuzzingResources */; };
6EDD3B4620BF247500C33877 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
6EDD3B4820BF247500C33877 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
6EDD3B4920BF247500C33877 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; };
@@ -453,6 +454,7 @@
618BBE9A20B89AAC00B5BCE7 /* status.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = status.pb.h; sourceTree = "<group>"; };
61F72C5520BC48FD001A68CB /* serializer_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = serializer_test.cc; sourceTree = "<group>"; };
69E6C311558EC77729A16CF1 /* Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.debug.xcconfig"; sourceTree = "<group>"; };
+ 6ED6DEA120F5502700FC6076 /* FuzzingResources */ = {isa = PBXFileReference; lastKnownFileType = folder; path = FuzzingResources; sourceTree = "<group>"; };
6EDD3B5B20BF247500C33877 /* Firestore_FuzzTests_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Firestore_FuzzTests_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6EDD3B5C20BF247500C33877 /* Firestore_FuzzTests_iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Firestore_FuzzTests_iOS-Info.plist"; sourceTree = "<group>"; };
6EDD3B5E20BF24D000C33877 /* FSTFuzzTestsPrincipal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTFuzzTestsPrincipal.mm; sourceTree = "<group>"; };
@@ -916,6 +918,7 @@
6EDD3B5D20BF24A700C33877 /* FuzzTests */ = {
isa = PBXGroup;
children = (
+ 6ED6DEA120F5502700FC6076 /* FuzzingResources */,
6EDD3B5E20BF24D000C33877 /* FSTFuzzTestsPrincipal.mm */,
6EDD3B5C20BF247500C33877 /* Firestore_FuzzTests_iOS-Info.plist */,
);
@@ -1248,6 +1251,7 @@
6EDD3B4520BF247500C33877 /* Frameworks */,
6EDD3B4A20BF247500C33877 /* Resources */,
6EDD3B5720BF247500C33877 /* [CP] Embed Pods Frameworks */,
+ 6E622C7A20F52C8300B7E93A /* Run Script */,
);
buildRules = (
);
@@ -1401,6 +1405,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 6E59498D20F55BA800ECD9A5 /* FuzzingResources in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1537,6 +1542,23 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
+ 6E622C7A20F52C8300B7E93A /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 12;
+ files = (
+ );
+ inputPaths = (
+ "$(SRCROOT)/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos",
+ );
+ name = "Run Script";
+ outputPaths = (
+ "$(TARGET_BUILD_DIR)/FuzzTestsCorpus",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh\"";
+ showEnvVarsInLog = 0;
+ };
6EDD3AD420BF247500C33877 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
diff --git a/Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm b/Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm
index 0d832c0..7acb8b5 100644
--- a/Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm
+++ b/Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm
@@ -29,15 +29,16 @@ 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) {
- DatabaseId database_id{"project", DatabaseId::kDefault};
- Serializer serializer{database_id};
-
- @try {
- serializer.DecodeFieldValue(data, size);
- } @catch (...) {
- // Caught exceptions are ignored because the input might be malformed and
- // the deserialization might throw an error as intended. Fuzzing focuses on
- // runtime errors that are detected by the sanitizers.
+ Serializer serializer{DatabaseId{"project", DatabaseId::kDefault}};
+
+ @autoreleasepool {
+ @try {
+ serializer.DecodeFieldValue(data, size);
+ } @catch (...) {
+ // Caught exceptions are ignored because the input might be malformed and
+ // the deserialization might throw an error as intended. Fuzzing focuses on
+ // runtime errors that are detected by the sanitizers.
+ }
}
}
@@ -50,10 +51,27 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
// Simulates calling the main() function of libFuzzer (FuzzerMain.cpp).
int RunFuzzTestingMain() {
+ // Get dictionary file path from resources and convert to a program argument.
+ NSString *plugins_path = [[NSBundle mainBundle] builtInPlugInsPath];
+
+ NSString *dict_location =
+ @"Firestore_FuzzTests_iOS.xctest/FuzzingResources/Serializer/serializer.dictionary";
+ NSString *dict_path = [plugins_path stringByAppendingPathComponent:dict_location];
+ const char *dict_arg = [[NSString stringWithFormat:@"-dict=%@", dict_path] UTF8String];
+
+ // Get corpus and convert to a program argument.
+ NSString *corpus_location = @"FuzzTestsCorpus";
+ NSString *corpus_path = [plugins_path stringByAppendingPathComponent:corpus_location];
+ const char *corpus_arg = [corpus_path UTF8String];
+
// Arguments to libFuzzer main() function should be added to this array,
- // e.g., dictionaries, corpus, number of runs, jobs, etc.
+ // e.g., dictionaries, corpus, number of runs, jobs, etc. The FuzzerDriver of
+ // libFuzzer expects the non-const argument 'char ***argv' and it does not
+ // modify it throughout the method.
char *program_args[] = {
- const_cast<char *>("RunFuzzTestingMain") // First arg is program name.
+ const_cast<char *>("RunFuzzTestingMain"), // First arg is program name.
+ const_cast<char *>(dict_arg), // Dictionary arg.
+ const_cast<char *>(corpus_arg) // Corpus must be the last arg.
};
char **argv = program_args;
int argc = sizeof(program_args) / sizeof(program_args[0]);
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh
new file mode 100755
index 0000000..772e858
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Converts text protos to binary protos. Text protos are retrieved from the
+# folder defined by SCRIPT_INPUT_FILE_0 and the generated binary protos are
+# stored in the folder defined by SCRIPT_OUTPUT_FILE_0. Both SCRIPT_INPUT_FILE_0
+# and SCRIPT_OUTPUT_FILE_0 are defined in the Run Script Build Phase of the
+# XCode build target Firestore_FuzzTests_iOS that executes this script. XCode
+# defines these environment variables and makes them available to the script.
+
+# Directory that contains the text protos to convert to binary protos.
+text_protos_dir="${SCRIPT_INPUT_FILE_0}"
+
+# Create a folder to write binary protos to. This is our corpus.
+binary_protos_dir="${SCRIPT_OUTPUT_FILE_0}"
+mkdir -p "${binary_protos_dir}"
+
+echo "Converting text proto files in directory: $text_protos_dir"
+echo "Writing binary proto files to directory: $binary_protos_dir"
+
+# Run proto conversion command for each file content.
+for text_proto_file in "${text_protos_dir}"/*; do
+ file_name="$(basename -- "${text_proto_file}")"
+ file_content="$(cat "${text_proto_file}")"
+
+ # Choose an appropriate message type depending on the prefix of the file.
+ message_type="Value"
+ if [[ "${file_name}" == doc-* ]]; then
+ message_type="Document"
+ elif [[ "${file_name}" == fv-* ]]; then
+ message_type="Value"
+ elif [[ "${file_name}" == arr-* ]]; then
+ message_type="ArrayValue"
+ elif [[ "${file_name}" == map-* ]]; then
+ message_type="MapValue"
+ fi
+
+ # Run the conversion.
+ # TODO(minafarid): This conversion relies on protoc as built by the cmake
+ # build. Switch this to using a pod dependency of protoc.
+ echo "Converting file: ${file_name} (type: ${message_type})"
+ echo "${file_content}" \
+ | "${SRCROOT}/../../build/external/protobuf/src/protobuf-build/src/protoc" \
+ -I"${SRCROOT}/../../Firestore/Protos/protos" \
+ -I"${SRCROOT}/../../build/external/protobuf/src/protobuf/src" \
+ --encode=google.firestore.v1beta1."${message_type}" \
+ google/firestore/v1beta1/document.proto > "${binary_protos_dir}/${file_name}"
+done
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/arr-strings-01 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/arr-strings-01
new file mode 100644
index 0000000..f67b8c6
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/arr-strings-01
@@ -0,0 +1,16 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+values: { string_value: "hi" }
+values: { string_value: "hello" }
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-01 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-01
new file mode 100644
index 0000000..0255568
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-01
@@ -0,0 +1,23 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: "doc-01"
+fields: {
+ key: "a",
+ value: { string_value: "a_value" }
+}
+fields: {
+ key: "b"
+ value: { boolean_value: true }
+}
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-02 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-02
new file mode 100644
index 0000000..3177c9a
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-02
@@ -0,0 +1,47 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: "doc-02"
+fields: {
+ key: "a",
+ value: { integer_value: 99882 }
+}
+fields: {
+ key: "b"
+ value: { boolean_value: false }
+}
+fields: {
+ key: "c"
+ value: { double_value: 92.22 }
+}
+fields: {
+ key: "d"
+ value: { string_value: "92.22" }
+}
+fields: {
+ key: "e"
+ value: { array_value: {
+ values: { string_value: "hi" }
+ values: { string_value: "hello" }
+ }
+ }
+}
+fields: {
+ key: "f"
+ value: { array_value: {
+ values: { integer_value: 10 }
+ values: { integer_value: 11 }
+ }
+ }
+}
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-03 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-03
new file mode 100644
index 0000000..cac02ca
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/doc-03
@@ -0,0 +1,91 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: "doc-03 has a long name with spaces"
+fields: {
+ key: "a1",
+ value: { integer_value: 100000000 }
+}
+fields: {
+ key: "a2",
+ value: { integer_value: 31432432 }
+}
+fields: {
+ key: "a3",
+ value: { double_value: -123123.913 }
+}
+fields: {
+ key: "a4",
+ value: { integer_value: 454365464 }
+}
+fields: {
+ key: "a5",
+ value: { double_value: 123.54536 }
+}
+fields: {
+ key: "b1"
+ value: { boolean_value: false }
+}
+fields: {
+ key: "b2"
+ value: { boolean_value: true }
+}
+fields: {
+ key: "c"
+ value: { reference_value: "some reference string with spaces" }
+}
+fields: {
+ key: "d"
+ value: { string_value: "92.22" }
+}
+fields: {
+ key: "e1"
+ value: { array_value: {
+ values: { string_value: "hi" }
+ values: { string_value: "hello" }
+ }
+ }
+}
+fields: {
+ key: "e1"
+ value: { array_value: {
+ values: { string_value: "hello" }
+ values: { string_value: "world" }
+ values: { string_value: "!" }
+ }
+ }
+}
+fields: {
+ key: "e2-mixed"
+ value: { array_value: {
+ values: { integer_value: 1 }
+ values: { double_value: 10.234 }
+ values: { string_value: "world" }
+ }
+ }
+}
+fields: {
+ key: "f1-map"
+ value: { map_value: {
+ fields {
+ key: "key_for_boolean"
+ value: { boolean_value: true }
+ }
+ fields {
+ key: "key_int"
+ value: { integer_value: 2344 }
+ }
+ }
+ }
+}
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-boolean-01 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-boolean-01
new file mode 100644
index 0000000..68f38e0
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-boolean-01
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+boolean_value: true
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-boolean-02 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-boolean-02
new file mode 100644
index 0000000..ff41ba0
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-boolean-02
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+boolean_value: false
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-01 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-01
new file mode 100644
index 0000000..05e5f36
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-01
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+double_value: 0.0
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-02 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-02
new file mode 100644
index 0000000..e96b15f
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-02
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+double_value: 0.1
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-03 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-03
new file mode 100644
index 0000000..4c383af
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-03
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+double_value: -0.1
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-04 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-04
new file mode 100644
index 0000000..fe125a7
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-04
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+double_value: 1.0
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-05 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-05
new file mode 100644
index 0000000..7ddaff1
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-05
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+double_value: -1.0
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-06 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-06
new file mode 100644
index 0000000..c5c520f
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-06
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+double_value: 100.5010203
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-07 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-07
new file mode 100644
index 0000000..5030860
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-07
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+double_value: -100.5010203
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-08 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-08
new file mode 100644
index 0000000..9fdbc34
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-08
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+double_value: 1321241987
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-09 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-09
new file mode 100644
index 0000000..a9642b7
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-double-09
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+double_value: -1321241987
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-01 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-01
new file mode 100644
index 0000000..2f7663b
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-01
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+integer_value: 0
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-02 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-02
new file mode 100644
index 0000000..3bd5cec
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-02
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+integer_value: 1
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-03 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-03
new file mode 100644
index 0000000..01fe651
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-03
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+integer_value: -1
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-04 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-04
new file mode 100644
index 0000000..3bd5cec
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-04
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+integer_value: 1
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-05 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-05
new file mode 100644
index 0000000..b1d090d
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-05
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+integer_value: -1000000
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-06 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-06
new file mode 100644
index 0000000..4bc30db
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-06
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+integer_value: 2147483647
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-07 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-07
new file mode 100644
index 0000000..53b69f5
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-int-07
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+integer_value: -2147483647
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-map-01 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-map-01
new file mode 100644
index 0000000..084e925
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-map-01
@@ -0,0 +1,20 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+map_value: {
+ fields: {
+ key: "a",
+ value: {string_value: "value for key a"}
+ }
+}
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-map-02 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-map-02
new file mode 100644
index 0000000..8d07094
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-map-02
@@ -0,0 +1,24 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+map_value: {
+ fields: {
+ key: "a-duplicate",
+ value: {integer_value: 123}
+ }
+ fields: {
+ key: "a-duplicate",
+ value: {integer_value: 324}
+ }
+}
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-01 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-01
new file mode 100644
index 0000000..0531a8f
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-01
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+string_value: "Hello"
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-02 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-02
new file mode 100644
index 0000000..d69f9e2
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-02
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+string_value: "a"
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-03 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-03
new file mode 100644
index 0000000..2e4135f
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-03
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+string_value: ""
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-04 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-04
new file mode 100644
index 0000000..f14d8eb
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-04
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+string_value: "this is a looooooooooooooong string"
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-05 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-05
new file mode 100644
index 0000000..49d42eb
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-05
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+string_value: "this is a loooooooooooooooooooooooooonger string that has no meaningful information."
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-06 b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-06
new file mode 100644
index 0000000..a2c858f
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/TextProtos/fv-string-06
@@ -0,0 +1,15 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+string_value: "Super long. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Sit amet dictum sit amet justo donec. Vitae sapien pellentesque habitant morbi tristique senectus. Turpis egestas maecenas pharetra convallis posuere morbi. Id semper risus in hendrerit gravida rutrum. Quis auctor elit sed vulputate mi sit amet mauris commodo. At varius vel pharetra vel. Lobortis feugiat vivamus at augue eget arcu dictum varius. Et tortor at risus viverra adipiscing at in tellus. Tortor aliquam nulla facilisi cras fermentum odio."
diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/serializer.dictionary b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/serializer.dictionary
new file mode 100644
index 0000000..9254665
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/serializer.dictionary
@@ -0,0 +1,30 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+quote="'"
+quotes="\""
+colon=":"
+underscore="_"
+dot="."
+asterisk="*"
+backslash="\\"
+foreslash="/"
+newline="\x0A"
+null="\x00"
+a="a"
+b="b"
+z="z"
+zero="0"
+one="1"
+nine="9"