summaryrefslogtreecommitdiffstats
path: root/net/cookies
diff options
context:
space:
mode:
authoreroman <eroman@chromium.org>2016-03-02 14:46:30 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-02 22:48:45 +0000
commite6264fd9d125c729b60aad95924a6464e6d1b071 (patch)
tree5597e1066ad9f3cfb6320bd22e928368118acdde /net/cookies
parent2160ae0126d1adc88ec8abe5f97291119cb42d68 (diff)
downloadchromium_src-e6264fd9d125c729b60aad95924a6464e6d1b071.zip
chromium_src-e6264fd9d125c729b60aad95924a6464e6d1b071.tar.gz
chromium_src-e6264fd9d125c729b60aad95924a6464e6d1b071.tar.bz2
Add fuzz testers to //net for some functions with simple parsing APIs.
TBR=jshin@chromium.org Review URL: https://codereview.chromium.org/1735043004 Cr-Commit-Position: refs/heads/master@{#378865}
Diffstat (limited to 'net/cookies')
-rw-r--r--net/cookies/parse_cookie_line_fuzzer.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/cookies/parse_cookie_line_fuzzer.cc b/net/cookies/parse_cookie_line_fuzzer.cc
new file mode 100644
index 0000000..9978398
--- /dev/null
+++ b/net/cookies/parse_cookie_line_fuzzer.cc
@@ -0,0 +1,15 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "net/cookies/parsed_cookie.h"
+
+// Entry point for LibFuzzer.
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+ std::string input(data, data + size);
+ net::ParsedCookie parsed_cookie(input);
+ return 0;
+}