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

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

Issue 1654503002: [libfuzzer] Fix compile error from missing courgette_fuzzer.cc include. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 | « no previous file | 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/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "courgette/assembly_program.h" 6 #include "courgette/assembly_program.h"
7 #include "courgette/courgette.h" 7 #include "courgette/courgette.h"
8 #include "courgette/encoded_program.h" 8 #include "courgette/encoded_program.h"
9 #include "courgette/program_detector.h"
9 10
10 // Entry point for LibFuzzer. 11 // Entry point for LibFuzzer.
11 extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size) { 12 extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size) {
12 scoped_ptr<courgette::AssemblyProgram> prog; 13 scoped_ptr<courgette::AssemblyProgram> prog;
13 courgette::Status status = 14 courgette::Status status =
14 courgette::ParseDetectedExecutable(data, size, &prog); 15 courgette::ParseDetectedExecutable(data, size, &prog);
15 if (status != courgette::C_OK) { 16 if (status != courgette::C_OK) {
16 return 0; 17 return 0;
17 } 18 }
18 scoped_ptr<courgette::EncodedProgram> enc_prog(prog->Encode()); 19 scoped_ptr<courgette::EncodedProgram> enc_prog(prog->Encode());
19 return 0; 20 return 0;
20 } 21 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698