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

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

Issue 1578413002: [libfuzzer] unittest-style main driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 11 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
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 // This fuzzer is simplified & cleaned up pdfium/samples/pdfium_test.cc 5 // This fuzzer is simplified & cleaned up pdfium/samples/pdfium_test.cc
6 6
7 #include <assert.h>
7 #include <limits.h> 8 #include <limits.h>
8 #include <stdio.h> 9 #include <stdio.h>
9 #include <stdlib.h> 10 #include <stdlib.h>
10 #include <string.h> 11 #include <string.h>
11 #include <unistd.h> 12 #include <unistd.h>
12 13
13 #include <list> 14 #include <list>
14 #include <sstream> 15 #include <sstream>
15 #include <string> 16 #include <string>
16 #include <utility> 17 #include <utility>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 FPDF_LIBRARY_CONFIG config; 197 FPDF_LIBRARY_CONFIG config;
197 UNSUPPORT_INFO unsupport_info; 198 UNSUPPORT_INFO unsupport_info;
198 }; 199 };
199 200
200 static TestCase* testCase = new TestCase(); 201 static TestCase* testCase = new TestCase();
201 202
202 extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size) { 203 extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size) {
203 RenderPdf(reinterpret_cast<const char*>(data), size); 204 RenderPdf(reinterpret_cast<const char*>(data), size);
204 return 0; 205 return 0;
205 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698