Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: testing/libfuzzer/fuzzers/url_parse_fuzzer.cc

Issue 1467713004: initializing ICU in url fuzzer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « testing/libfuzzer/fuzzers/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h"
6 #include "base/i18n/icu_util.h"
5 #include "url/gurl.h" 7 #include "url/gurl.h"
6 8
9 struct TestCase {
10 TestCase() {
11 assert(base::i18n::InitializeICU());
12 }
13
14 // used by ICU integration.
15 base::AtExitManager at_exit_manager;
16 };
17
18 TestCase test_case;
krasin 2015/11/21 00:07:12 Per Google C++ style guide ([1]), which Chromium f
aizatsky 2015/11/21 00:11:36 This is the exact opposite of what Kostya asks to
aizatsky 2015/11/21 01:13:40 replaced by a pointer.
19
7 // Entry point for LibFuzzer. 20 // Entry point for LibFuzzer.
8 extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, 21 extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data,
9 unsigned long size) { 22 unsigned long size) {
10 GURL url(std::string(reinterpret_cast<const char*>(data), size)); 23 GURL url(std::string(reinterpret_cast<const char*>(data), size));
11 return 0; 24 return 0;
12 } 25 }
OLDNEW
« no previous file with comments | « testing/libfuzzer/fuzzers/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698