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

Side by Side Diff: ui/display/util/edid_parser_fuzzer.cc

Issue 2294733002: Set log level to logging::LOG_FATAL for edid_parser_fuzzer. (Closed)
Patch Set: Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ui/display/util/edid_parser.h" 10 #include "ui/display/util/edid_parser.h"
11 #include "ui/gfx/geometry/size.h" 11 #include "ui/gfx/geometry/size.h"
12 12
13 struct Environment {
14 Environment() {
15 logging::SetMinLogLevel(logging::LOG_FATAL);
robert.bradford 2016/08/30 11:03:53 I didn't know you could do that - very ingenious.
16 }
17 };
18
19 Environment* env = new Environment();
20
13 // Entry point for LibFuzzer. 21 // Entry point for LibFuzzer.
14 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 22 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
15 std::vector<uint8_t> edid; 23 std::vector<uint8_t> edid;
16 edid.assign(data, data + size); 24 edid.assign(data, data + size);
17 uint16_t manufacturer_id, product_code; 25 uint16_t manufacturer_id, product_code;
18 std::string human_readable_name; 26 std::string human_readable_name;
19 gfx::Size active_pixel_size, physical_display_size; 27 gfx::Size active_pixel_size, physical_display_size;
20 bool overscan; 28 bool overscan;
21 29
22 ui::ParseOutputDeviceData(edid, &manufacturer_id, &product_code, 30 ui::ParseOutputDeviceData(edid, &manufacturer_id, &product_code,
23 &human_readable_name, &active_pixel_size, 31 &human_readable_name, &active_pixel_size,
24 &physical_display_size); 32 &physical_display_size);
25 33
26 ui::ParseOutputOverscanFlag(edid, &overscan); 34 ui::ParseOutputOverscanFlag(edid, &overscan);
27 return 0; 35 return 0;
28 } 36 }
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